lkml.org 
[lkml]   [1999]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectAsync notification for fifos possible?
Date
Hi all!

Several programming (and reading) hours after trying to find an answer to
my question I decided to write to this newsgroup.

I would like to know if the current kernel supports an asynchronous
notification for FIFOs. I interpreted the collected information about this
problem as follows: If I create a FIFO and open it from the client and the
server, I can exchange data via that FIFO. In my book about Linux Kernel
Programming there is a hint for using the async notification, the SIGIO
signal will be set. But I do not get this signal on server side, when the
client writes something in the fifo :-((((

Can anyone help me?

marc

---snip---

Here is what I implement on server side:
...
fd = open("/tmp/hello.fifo", O_RDWR);
ioctl(fd, FIOASYNC, &arg); // arg is 0
fcntl(fd, F_SETFD, FASYNC);
fcntl(fd, F_SETSIG, SIGIO);
signal(SIGIO, sig_io); // where sig_io prints s.th to the stdout.
...


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.036 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site