SIGIO Howto

| No Comments | No TrackBacks

User code to enable async notification by SIGIO:

signal(SIGIO, &handler); // instead, do sigaction() in real code!
fcntl(fd, F_SETOWN, getpid());
int oflags = fcntl(fd, F_GETFL);
fcntl(fd, F_SETFL, oflags|FASYNC);

Driver method:
filp->fasync(): called when FASYNC flag has modified.

Kernel functions:
fasync_helper(): Register listener process.
kill_fasync(): Transmit signals to listener processes.

No TrackBacks

TrackBack URL: http://yasu2.prosou.nu/mt/mt-tb.cgi/2090

Leave a comment

OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.02

August 2010

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Yasunori Osana published on November 11, 2009 6:44 PM.

GhostBSD 1.0 beta mirror. was the previous entry in this blog.

政権交代と医療 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.