# # patch "netxx_pipe.cc" # from [7064629554eef528cffc0c0492b7542588cafd94] # to [318b2bdcf99056633351a82117b72919aa3af7ac] # # patch "netxx_pipe.hh" # from [ea2ea18000ee00822b72c66c5dec449a947f43bc] # to [a7dc0c04e3c327a4afdd379b6eae7d709d105864] # ======================================================================== --- netxx_pipe.cc 7064629554eef528cffc0c0492b7542588cafd94 +++ netxx_pipe.cc 318b2bdcf99056633351a82117b72919aa3af7ac @@ -21,13 +21,19 @@ #include // create pipes for stdio and fork subprocess -static pid_t pipe_and_fork(int *fd1,int *fd2) -{ pid_t result=-1; +static pid_t +pipe_and_fork(int *fd1,int *fd2) +{ + pid_t result=-1; fd1[0]=-1; fd1[1]=-1; fd2[0]=-1; fd2[1]=-1; if (pipe(fd1)) return -1; if (pipe(fd2)) - { close(fd1[0]); close(fd1[1]); return -1; } + { + close(fd1[0]); + close(fd1[1]); + return -1; + } result=fork(); if (result<0) { close(fd1[0]); close(fd1[1]); ======================================================================== --- netxx_pipe.hh ea2ea18000ee00822b72c66c5dec449a947f43bc +++ netxx_pipe.hh a7dc0c04e3c327a4afdd379b6eae7d709d105864 @@ -56,8 +56,14 @@ virtual void close (void); virtual socket_type get_socketfd (void) const; virtual const ProbeInfo* get_probe_info (void) const; - int get_readfd(void) const { return readfd; } - int get_writefd(void) const { return writefd; } + int get_readfd(void) const + { + return readfd; + } + int get_writefd(void) const + { + return writefd; + } }; #ifdef WIN32 @@ -71,7 +77,15 @@ public: PipeCompatibleProbe() : is_pipe(), pipe(), ready_t() {} void clear() - { if (is_pipe) { pipe=0; is_pipe=false; } else Probe::clear(); } + { + if (is_pipe) + { + pipe=0; + is_pipe=false; + } + else + Probe::clear(); + } result_type ready(const Timeout &timeout=Timeout(), ready_type rt=ready_none); void add(PipeStream &ps, ready_type rt=ready_none); void add(const StreamBase &sb, ready_type rt=ready_none); @@ -86,7 +100,8 @@ }; #else struct PipeCompatibleProbe : Probe - { void add(PipeStream &ps, ready_type rt=ready_none); + { + void add(PipeStream &ps, ready_type rt=ready_none); void add(const StreamBase &sb, ready_type rt=ready_none); void add(const StreamServer &ss, ready_type rt=ready_none); };