From: Laurent Deniel <deniel@worldnet.fr>
Cc: Jean Dominique DARJO <darjo@sdc.thomson.fr>,
Subject: strange semop failure
Date: 1996/09/20 [thread overview]
Message-ID: <3242EF41.1CD3C06C@worldnet.fr> (raw)
Twice a year, I had a problem with a semop operation on DU 3.2.
A program which usually works fine, fails on a blocking call to the
semop system call (the semop arguments are correct, and the system
call is restarted at reception of a signal (EINTR)). When these
strange errors occur, the errno value was incorrect (non documented
in the manual page), any idea ?
Thanks,
Laurent.
PS: In the following example, a return value different from 0 is
considered as an error, can the semop system call return
a value greater than 0 on successful completion ?
do
{
sem_result = semop( ... );
}
while (sem_result < 0 && errno == EINTR);
if ( sem_result != 0 )
{
if ( errno == EAGAIN )
{
...
}
else
{
perror("semop");
...
}
}
...
--
Laurent DENIEL | E-mail: deniel@worldnet.fr
Paris, FRANCE | WWW : http://www.worldnet.net/~deniel
reply other threads:[~1996-09-20 4:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox