> >> 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()
From:
http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html#tag_02_04
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
functions:
[...]
write()
Cheers,
Michael
--
NEU: Telefon-Flatrate fürs dt. Festnetz! GMX Phone_Flat: 9,99 Euro/Mon.*
Für DSL-Nutzer. Ohne Providerwechsel! http://www.gmx.net/de/go/telefonie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]