Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Help required: INTERRUPTED SYSTEM CALL
@ 1999-12-17  5:00 Wendy Lim
  1999-12-17  5:00 ` Serguei Patchkovskii
  0 siblings, 1 reply; 2+ messages in thread
From: Wendy Lim @ 1999-12-17  5:00 UTC (permalink / raw)


 hi All
We have a custom built application which runs on
 Digital Unix 4.0D. This application uses msgsnd and
msgrcv to process messages sent to/from a user defined
queue.

This application runs on at three different  environments which are
identical in terms of the hard
 disk space, memory etc. Only on the production environment does it
encounter the above error
 after a specific event (the event is associated with day end processing
jobs on our system). The
" Interrupted system call error" causes the application
 to exit.  I put in debug statements and ran a test on the
 production systems and found the following results:
1) The msgrcv() function returns -1
2) A perror() returns INTERRUPTED SYSTEM CALL
3) A call to msgctl()(this gives info on the message queue which is being
called)  after the msgrcv() -1
return gives the following results:
    msgctl.msg buffer = NULL
    msgctl.msg buffer ltype = -7152
    msgctl.msg last process send =0
    msgctl.msg last process receive =0

I suspect the msgrcv function is returning -1 due to a
signal interrupt (errno=EINTR) but if my own process
is not sending a signal to the queue what is? I can
tell that my own process has not sent a signal from
the msgctl's last process send and last process
receive fields. Running the same application on my dev
environment and sending a deliberate error message
populates these two fields with the application pid.

How do i find out what an ltype of -7152 signifies.Our
ltypes are positive when we send to this queue.

Could it be a kernel setting? This is a strange error
as the same exe runs perfectly on all other
environments.

Thanks
Wendy Lim






^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Help required: INTERRUPTED SYSTEM CALL
  1999-12-17  5:00 Help required: INTERRUPTED SYSTEM CALL Wendy Lim
@ 1999-12-17  5:00 ` Serguei Patchkovskii
  0 siblings, 0 replies; 2+ messages in thread
From: Serguei Patchkovskii @ 1999-12-17  5:00 UTC (permalink / raw)


Wendy Lim (wendyl@pd.jaring.my) wrote:
: This application runs on at three different  environments which are
: identical in terms of the hard
:  disk space, memory etc. Only on the production environment does it
: encounter the above error
:  after a specific event (the event is associated with day end processing
: jobs on our system). The
: " Interrupted system call error" causes the application
:  to exit.  I put in debug statements and ran a test on the
:  production systems and found the following results:

Any correctly written program must be prepared to receive EINTR from msgrcv(),
as well as from most blocking system calls, and to deal with it (usually simply 
by re-issuing msgrcv()). EINTR simply indicates that a non-ignored signal (see 
"man 4 signal") arrived while msgrcv() was waiting for a message. This behavior
is clearly documented in the msgrcv manual page.

You can look up the rationaly for this behavior in any decent Unix programming 
text.

/Serge.P


--
home page: http://www.cobalt.chem.ucalgary.ca/ps/



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-12-17  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-12-17  5:00 Help required: INTERRUPTED SYSTEM CALL Wendy Lim
1999-12-17  5:00 ` Serguei Patchkovskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox