Hi!

Could someone give me some light on the SA_RESTART flag used by
sigaction() as the man page and the *info file contain contrary
information

[snip from the man page]

              SA_RESTART
                     The opposite to SA_ONESHOT, do  not  restore
                     the  signal  action.  This provides behavior
                     compatible with BSD signal semantics.


This seems to be right. I tested it. The SA_RESTART makes the signal
action not be changed with the default action once raised.


[snip from the libc info file]

 - Macro: int SA_RESTART
     This flag controls what happens when a signal is delivered during
     certain primitives (such as `open', `read' or `write'), and the
     signal handler returns normally.  There are two alternatives: the
     library function can resume, or it can return failure with error
     code `EINTR'.

     The choice is controlled by the `SA_RESTART' flag for the
     particular kind of signal that was delivered.  If the flag is set,
     returning from a handler resumes the library function.  If the
     flag is clear, returning from a handler makes the function fail.
     

Well.. I have no idea how to raise signal during open() and to test
this...


So , why is the info contrary and is the man page correct as I think?

And how to acquire behaviour as explained by the *info file i.e. to make
i/o functions "atomic" in the way of resuming operation and not returning
EINTR?


Thanx for the attention!

        Marin



          -= Why do we need gates in a world without fences? =-

Reply via email to