SysV (ARDENT) and SIGIO
Sean.Levy at CS.CMU.EDU
Sean.Levy at CS.CMU.EDU
Sat Nov 3 02:12:32 AEST 1990
Under BSD and all the BSDalikes we have at our disposal, the following
scheme works:
{
s = socket(...);
...
signal(SIGIO, handler);
fcntl(s, F_SETOWN, getpid());
go_do_my_thang();
...
}
handler()
{
c = accept(s, ...);
...
}
Well, you get the idea. The point is, the code works just fine under
Mach/BSD, Ultrix, other BSDish systems; a SIGIO interrupt is delivered
whenever someone does a connect() to s. However, on the ARDENT under
whatever perverted SysV + BSD sugar thing they run there, no interrupt
is delivered when a connect() is done -- nothing happens at all, as a
matter of fact. SIGIO does seem to work for actual I/O, e.g. if you set
it up in an analagous way and use SIGIO to be notified of write()'s on
the socket, it does work. This also works in BSD, of course.
So, my question is: can you use SIGIO under ARDENT's (or anyone else's)
SysV to be notified of an attempt to connect to a socket? The point is
to have this piece of code be portable to a number of platforms, and
also be operable in a heterogenous environment, e.g. a purely SysV
solution to this is no good. I thought that a more generic way of doing
this would be to fork a process that sits on the socket in accept(),
accepts connections and shuffles I/O to its parent (maybe using SIGIO in
the parent to be notified of I/O, since this seems to work).
Thanks in advance,
--S
sean levy, edrc, cmu, pittsburgh, pa. snl+ at cs.cmu.edu 412 268 2257
don't believe the hype
More information about the Comp.unix.questions
mailing list