Problems with SIGPOLL using libsocket.a (BSD)
Christian Kasperbauer
kasperba at Informatik.TU-Muenchen.DE
Fri Apr 5 20:18:59 AEST 1991
Hi out there,
perhaps that's the wrong newsgroup for my request, I don't know, but I've the
following problem, so if anyone can help me, please answer:
I'm writing a client/server application between a Sun Sparc and a Intel i386
workstation using Berkley stream sockets. The server is running on the i386 and
is implemented as a UNIX daemon, i.e. he is sleeping until a SIGPOLL signal
arrives. On the i386 runs INTERACTIVE 386/ix and I'm using the libsocket.a
library, which emulates Berkley sockets on System V streams.
I did the following steps to initialize the sockets:
sock[i] = open (AF_INET, SOCK_STREAM, IP)
...
bind (sock[i], ...
...
FD_SET (sock[i], read_template);
#ifdef SYSV
ioctl (sock[i], I_SETSIG, S_INPUT);
#else
fcntl (sock[i], F_SETOWN, getpid ());
fcntl (sock[i], F_SETFL, FASYNC);
#endif
...
The daemon's signal handler is of the following form:
void handler ()
...
hlp = read_template;
while (select (FD_SETSIZE, &hlp, NULL, NULL &timeout) > 0)
...
/* poll sockets
*/
...
The problem is, no SIGPOLL signal arrives, but under BSD this code runs fine
(for example between a VAX and a Sun or an Alliant FX2800). So my question is,
what did I forget to initialize? AT&T handbooks deal only with System V
streams, i.e. the poll() system call, which I don't want to use. Is there a
difference between SIGIO (BSD) and SIGPOLL (System V)? Does anyone know a
correct solution for this problem or a tricky work around?
Hope to receive a positive answer,
Christian
P.S.: Please answer by e-mail, I don't read frequently this newsgroup.
--
+=======================================================================+
| Christian Kasperbauer (Kasperl) |
| kasperba at lan.informatik.tu-muenchen.dbp.de |
| |
| Munich University of Technology, Department of Computer Science, FRG |
|-----------------------------------------------------------------------|
| phone: +49-89 2105-3251 or -8254 private: +49-89 7551462 |
| FAX : +49-89 2800529 |
|-----------------------------------------------------------------------|
| "Every day we make it, we'll make it the best we can" (Jack Daniel) |
+=======================================================================+
More information about the Comp.unix.sysv386
mailing list