Jan Vroonhof <vroonhof(a)math.ethz.ch> writes:
[...]
> You can read in the SIGIO description, the prefered way to generate
> the signal is setting asynchronous mode with 'fcntl'
Question. Are these ioctls lists coming from glibc or are they indirectly
from the kernel includes? There is a stream implementation for Linux,
maybe these ioctl's are there in the headers to have them reserved?
The I_[SG]ETSIG ioctl's are defined in bits/stropts.h which is part of
glibc.
The appended source seems to be the most minimal program showing
differences. At a SUN result is '0' everytime, but here (glibc2.1)
'-1', indicating the E_INVAL error.
Perhaps the glibc is faulty; I will contact the developers next week.
Nevertheless the method in sysdep.c (using I_GETSIG before I_SETSIG)
seems to be wrong. The SUN streamio(7I) manpage says I_GETSIG can be
called only if the process is already registered to receive the
SIGPOLL signal. But to do this, I_SETSIG must be used. That's why
calling I_GETSIG before I_SETSIG will fail.
Enrico
--
eMail: enrico.scholz(a)wirtschaft.tu-chemnitz.de
talk: ensc(a)ultra.csn.tu-chemnitz.de