# # # patch "netxx_pipe.cc" # from [6517b7610819328a1a4062fe419f9438968267e6] # to [adc391ff54b62f4f759e3509d968d2f601b0b271] # # patch "netxx_pipe_stdio_main.cc" # from [c2233bd6294a7c92d2e41fc6fad15157862a5f87] # to [310dad2c7950f21e3ded58f6a3555d7e9ddc65bd] # ============================================================ --- netxx_pipe.cc 6517b7610819328a1a4062fe419f9438968267e6 +++ netxx_pipe.cc adc391ff54b62f4f759e3509d968d2f601b0b271 @@ -42,8 +42,8 @@ Netxx::StdioStream::StdioStream(void) readfd ((int)GetStdHandle(STD_INPUT_HANDLE)), writefd ((int)GetStdHandle(STD_OUTPUT_HANDLE)) #else - readfd (stdin), - writefd (stdout) + readfd (STDIN_FILENO), + writefd (STDOUT_FILENO) #endif { // This allows netxx to call select() on these file descriptors. On Win32, @@ -190,7 +190,10 @@ Netxx::StdioStream::get_socketfd (void) Netxx::socket_type Netxx::StdioStream::get_socketfd (void) const { - return writefd; // only used to register session in netsync + // This is used netsync only to register the session for deletion, so it + // doesn't matter whether we return readfd or writefd. The unit test needs + // readfd in netxx_pipe_stdio_main.cc + return readfd; } const Netxx::ProbeInfo* ============================================================ --- netxx_pipe_stdio_main.cc c2233bd6294a7c92d2e41fc6fad15157862a5f87 +++ netxx_pipe_stdio_main.cc 310dad2c7950f21e3ded58f6a3555d7e9ddc65bd @@ -101,12 +101,12 @@ int main (int argc, char *argv[]) break; case Netxx::Probe::ready_write: - fprintf (stderr, "ready write\n", bytes_read); + fprintf (stderr, "ready write\n"); quit = 1; break; case Netxx::Probe::ready_oobd: - fprintf (stderr, "ready oobd\n", bytes_read); + fprintf (stderr, "ready oobd\n"); quit = 1; break; }