Discussion:
[omniORB] It seems there is a bug in SocketCollection.cc
Wei Jiang
2008-05-18 20:54:18 UTC
Permalink
/omni/src/lib/omniORB/orbcore/SocketCollection.cc

342 static void closePipe(int pipe_read, int pipe_write)
343 {
344 if (pipe_read > 0) close(pipe_read);
345 if (pipe_write > 0) close(pipe_write);
346 }

------------------------------------

342 static void closePipe(int pipe_read, int pipe_write)
343 {
* 344 if (pipe_read >= 0) close(pipe_read);
* 345 if (pipe_write >= 0) close(pipe_write);
346 }

***@sduept.com not work
Duncan Grisby
2008-05-29 19:09:32 UTC
Permalink
Post by Wei Jiang
/omni/src/lib/omniORB/orbcore/SocketCollection.cc
342 static void closePipe(int pipe_read, int pipe_write)
343 {
344 if (pipe_read > 0) close(pipe_read);
345 if (pipe_write > 0) close(pipe_write);
346 }
------------------------------------
342 static void closePipe(int pipe_read, int pipe_write)
343 {
* 344 if (pipe_read >= 0) close(pipe_read);
* 345 if (pipe_write >= 0) close(pipe_write);
346 }
Thanks. I've checked that change in. In future, it would be helpful if
you sent a proper patch made with diff -u, rather than an ad-hoc
hand-written diff.

Does any system actually use file descriptor 0 for the pipe?

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Wei Jiang
2008-05-30 11:55:22 UTC
Permalink
Post by Duncan Grisby
Does any system actually use file descriptor 0 for the pipe?
//Linux 2.6.25.3-18.fc9.i686
... ...
close(0);
... ...
pipe(pipefd); // pipefd[0] == 0

Loading...