UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2010-03-05 10:26 AM

jpourian
Member
From: Tehran
Registered: 2010-02-01
Posts: 14

Re: IPC Queue Error

I m using msgrcv command and get an intrupt. how can i recognize the signal number. and is there any method to reinitiate the queue so msgrcv works fine again?

Offline

#2 2010-03-05 01:25 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,230

Re: IPC Queue Error

You only get EINTR when your call was interrupted by a signal and your
signal handler was called, so if you wantto know what signal caused it let
the dignal handler store it in a global variable or something.

If you get EINTR and no signal handler was called then you're probably
running an older Linux and your process was stopped and continued again
with SIGSTOP and SIGCONT.

Just call msgrcv(2) again after it returns EINTR, that should work fine.

Offline

Board footer

Powered by FluxBB