signal handler for OOB data in Interactive UNIX
Eric Gisin
eric at mks.com
Fri Sep 28 09:52:21 AEST 1990
I am trying to set up a signal hander for OOB data in rlogin.c.
There does not seem to be anything in the manuals, so I tryed the following:
/* Define way of generating signal on OOB (urgent) data */
#ifndef SIGURG
/* For stream based tcp without SIGURG */
#define SIGURG SIGPOLL
#include <sys/stropts.h>
#define sigurgent(fd) ioctl(fd, I_SETSIG, S_HIPRI)
#else
/* For socket based tcp with SIGURG */
#include <sys/fcntl.h>
#define sigurgent(fd) fcntl(fd, F_SETOWN, getpid())
#endif
I set up a signal hander for SIGURG=SIGPOLL, and then do sigurgent(fd),
where fd is a connected socket. I don't get signals. Should this work?
Is OOB data on a socket a high priority message on a stream?
Do I have to convert rlogin to use select/poll?
More information about the Comp.unix.sysv386
mailing list