Menu

#2 Crash in fd_event_dispatcher when using named-pipes

strange_behaviour
open
5
2000-06-13
2000-06-13
Kevin Shea
No

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.

Discussion

  • Warwick Molloy

    Warwick Molloy - 2000-06-13

    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.

     
  • Warwick Molloy

    Warwick Molloy - 2000-06-13
    • assigned_to: nobody --> lemur
     
  • Kevin Shea

    Kevin Shea - 2000-06-14

    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

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.