Newsgroups: comp.unix.sysv386
Path: utzoo!utgpu!watserv1!watmath!mks.com!eric
From: eric@mks.com (Eric Gisin)
Subject: signal handler for OOB data in Interactive UNIX
Organization: Mortice Kern Systems Inc., Waterloo, Ontario, CANADA
Date: Thu, 27 Sep 90 23:52:21 GMT
Message-ID: <1990Sep27.235221.17564@mks.com>

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?
