[comp.sys.hp] Enabling SIGIO interrupts on stream sockets

dgeorge@svax.cs.cornell.edu (David George) (06/22/89)

I'm trying to trap to a handler routine each time that data
becomes available on a stream-type communication socket.  I'm using
HP-UX on a Series 800 machine (HP Release A.B3.00.5B).

The HP manuals suggest the following sequence of commands:

	pid = getpid();
	arg = 1;
	signal(SIGIO, my_handling_routine);
	ioctl(fildes, FIOSSAIOOWN, &pid);
	ioctl(fildes, FIOSSAIOSTAT, &arg);

So now a SIGIO signal should be generated each time that data becomes
available on socket fildes.  Instead, I get an "Operation not supported
on socket" error for the first ioctl() call.

A 4.3BSD Tutorial gave the alternative solution:

	signal(SIGIO, my_handling_routine);
	fcntl(fildes, F_SETOWN, getpid());
	fcntl(fildes, F_SETFL, FASYNC);

But F_SETOWN and FASYNC are not defined on my system.  Any ideas?

Dave George

klaas@hpindda.HP.COM (Darin Klaas) (06/26/89)

/ hpindda:comp.sys.hp / dgeorge@svax.cs.cornell.edu (David George) /  1:08 pm  Jun 21, 1989 /
> I'm trying to trap to a handler routine each time that data
> becomes available on a stream-type communication socket.  I'm using
> HP-UX on a Series 800 machine (HP Release A.B3.00.5B).

SIGIO is not supported on sockets until 3.1 and/or 6.5

-- darin