michielbuddingh + asynchronous   3

codeblog » using select on a fifo
" ... When dealing with sockets, the above loop is sane — EOF means the other end hung up and you’ll never get more data from the file descriptor. In the case of a FIFO, however, “0 length read” means there are no more FIFO writers — but more could attach later and continue feeding in data! The problem with this is that select misbehaves and marks the file descriptor as “EOF” forever. Only the initial select() call blocks until there is something to read — once it hits EOF, select will always immediately return, defeating the purpose of select() ... "
asynchronous  select  poll  fifo 
november 2009 by michielbuddingh
signalfd(2)
" ... signalfd() creates a file descriptor that can be used to accept signals targeted at the caller. This provides an alternative to the use of a signal handler or sigwaitinfo(2), and has the advantage that the file descriptor may be monitored by select(2), poll(2), and epoll(7) .. "
linux  programming  signals  asynchronous  events 
october 2009 by michielbuddingh
timerfd() and system call review [LWN.net]
" ... Now consider the timerfd() system call, which was added to the 2.6.22 kernel. The purpose of this call is to allow an application to obtain a file descriptor to use with timer events, eliminating the need to use signals ... "
linux  asynchronous  events  programming 
october 2009 by michielbuddingh

Copy this bookmark:



description:


tags: