Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* strange semop failure
@ 1996-09-20  4:00 Laurent Deniel
  0 siblings, 0 replies; only message in thread
From: Laurent Deniel @ 1996-09-20  4:00 UTC (permalink / raw)
  Cc: Jean Dominique DARJO


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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-09-20  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-09-20  4:00 strange semop failure Laurent Deniel

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