From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,96b83a4bbdec28bc,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1992-04-29 12:59:01 PST Path: sparky!uunet!olivea!decwrl!deccrl!news.crl.dec.com!hollie.rdg.dec.com!ryn.mro4.dec.com!nntpd.lkg.dec.com!usenet From: jc@sppip7.lkg.dec.com (John Chambers) Newsgroups: comp.sys.dec Subject: Re: Does SIGIO work with FIFOs in Ultrix 4.2? Keywords: SIGIO FIFO Message-ID: <1992Apr29.195901.10309@nntpd.lkg.dec.com> Date: 29 Apr 92 19:59:01 GMT References: <1992Apr28.143220.7221@nntpd.lkg.dec.com> Sender: usenet@nntpd.lkg.dec.com (USENET News System) Reply-To: jc@sppip7.lkg.dec.com (John Chambers) Organization: Digital Equipment Corporation We still haven't gotten SIGIO to work when there is data in a pipe, but I do have a stripped-down version of the program that may or may not hint what the problem is, while disproving all our hypotheses so far. Our evidence so far is that Ultrix doesn't ever produce a SIGIO signal when input arrives in a pipe. I'd love to be proved wrong... To try the following program, you should "mknod tstpipe p" to create its input pipe. You can then run it, and it will attempt to do interrupt-driven input from the pipe. For input, I have a tiny little program "jabber.c" that just does: n = strlen(av[ac-1]); while(1) { write(1,av[ac-1],n); write(1,"\n",1); sleep(1); } and I direct stdout to tstpipe. This works fine, and "cat #include #include /* * This is a test program for the SIGIO signal. It opens a file and * sets up asynchronous I/O on it, then sits in a loop waiting for * interrupts. It does a read each time around the loop, to catch cases * where the kernel fails to send the SIGIO interrupt. NOTE: This is a * test program that DOES NOT WORK on Ultrix 4.2; I'm trying to find * out why. DON'T use this as a prototype. IT DOESN'T WORK. */ #define BUF 64 char buf[BUF+1] = {0}; int bufsiz = BUF; int fil = -1; char *filnam = "tstpipe"; extern int errno; extern void sigIO(); /* * Read a buffer of data and display it. */ chunk() { int n; n = read(fil, buf, bufsiz); if (n > 0) { buf[n] = 0; fputs(buf, stdout); /* Dump to stdout */ fflush(stdout); } else if (n == 0) { errno = 0; /* This might be our exit status */ } return n; } /* * Input interrupt routine. */ void sigIO() { fputs("\nsigIO called.\n",stdout); fflush(stdout); chunk(); } main(ac, av, ev) char **av, **ev; { int a, n, s; int pid; for (a=1; a