[comp.unix.sysv386] signal handler for OOB data in Interactive UNIX

eric@mks.com (Eric Gisin) (09/28/90)

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?