Signal handlers and errno

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Sat Jan 5 09:54:41 AEST 1991


In article <25390 at adm.brl.mil> MANNS%DBNPIB5.BITNET at cunyvm.cuny.edu (Jochen Manns, PI der Uni Bonn, 732738/3611) writes:
  [ a signal handler may modify errno ]
>         For now I keep track on 'errno' in the signal handler but I
>         want to ask you if there is no better method to solve such
>         problems.

Saving and restoring errno is the correct method. The only ``better''
solution is not to make system calls inside handlers in the first place.

---Dan



More information about the Comp.unix.questions mailing list