Interrupted System Call

Interrupted System Call

Post by James Washingto » Fri, 21 Nov 1997 04:00:00

> Hi everybody!

> The subject is the message I get when running a program I have
> developed using the SparcWorks C compiler 4.0 on a Solaris 2.5
> workstation.

This message sounds like what perror would produce when a
system calls fails with errno set to EINTR. Are you using
perror or something similiar when calling the system ?


> I'm using signals, one that comes from a VME driver and one that is
> send between two processes. The handlers are set using sigaction with
> the .sa_flag=SA_RESTART, which means, as far as I know, that system
> calls won't be interrupted.

The man pages says that certain system calls are transparently
restarted. These calls are read,write,ioctl, fcntl, wait and waitid.
The implication I get is that some calls may get interupted
and fail. When this happens, errno is set to EINTR. A common
pratice is to check for EINTR and call the function again.
At any rate SA_RESTART does not block signal delivery.


> Do you know why I get this message? What I want is that when I get a
> signals and the handler finish the process continue where it was. Is
> taht possible?

Normally that is what happens, except when a system call is

Quote:> What I have to do?  Which process print this message,
> mine or kernel? Can I disable it?

I suspect it is yours since it sounds like a EINTR errno
message decoding.
> Than you very much for you help.

> C-ya
>         Jose Luis

> P.D.: Please E-mail me your answer when posting.

> Saludos