Crash in fd_event_dispatcher when using named-pipes
Status: Beta
Brought to you by:
w-molloy
On a linux build (Redhat 6.2, egcs 2.91.66) the test-pipe program crashes in fd_event_dispatcher::prepare_select()
The bug has been tracked down to the pipe not being created, resulting in prepare_select() calling FD_SET()
with a -1 file-descriptor.
FD_SET shouldn't (IMO) crash, but it is worth adding in some protecting code to prevent this.
Also, the reason for the pipe not being opened successfully is worth investigating.
Opening the pipe will fail because the named pipe or node must be created on the filesystem first.
The pipe-test.cc does an io_open on "test-pipe-pp" which should be created using mknod before running pipe-test.
I agree though that some graceful error handling is desirable.
Documentation needed to tell user to create pipe with mkfifo or mknod (or win32 equivalents). Might
be simpler to create the pipe in the test-application.
Works for small chunks passed into the pipe. But still crashes if a file longer than a single read_block
buffer is used. Checking this out