Re: blocking file lock functions (lockf,flock,fcntl) do not return after timer signal

From: Michael Kerrisk
Date: Wed Oct 12 2005 - 11:06:00 EST

> >> Also, using a 'C' runtime library call like write() in a signal-
> >> handler is a bug.
> >
> > But this is not correct. write() is async-signal-safe (POSIX
> > requires it).
> Then tell it to the doom-sayers who always excoriate me when
> I use a 'C' runtime library call in test signal code. I have
> been told that the __only__ thing you can do in a signal handler
> is access global memory and/or execute siglongjmp().

Nevertheless, it is not so. The problem that some may
complain about is not C RTL code, but perhaps using
printf() (wrong) instead of write()


The following table defines a set of functions that shall
be either reentrant or non-interruptible by signals and
shall be async-signal-safe. Therefore applications may
invoke them, without restriction, from signal-catching



NEU: Telefon-Flatrate fürs dt. Festnetz! GMX Phone_Flat: 9,99 Euro/Mon.*
Für DSL-Nutzer. Ohne Providerwechsel!
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at