Compare:
Code Block | ||
---|---|---|
| ||
void APPcreateNonblockingPipe(int Pipe[2]){
BAS_FUNCTION(APPcreateNonblockingPipe);
if (-1 == pipe(Pipe)) { BASerrorMessage(errno); }
if (-1 == fcntl(Pipe[0], F_SETFL, O_NONBLOCK)) { BASerrorMessage(errno); }
if (-1 == fcntl(Pipe[1], F_SETFL, O_NONBLOCK)) { BASerrorMessage(errno); }
BAS_TRC("Read Pipe = " << Pipe[0] << " Write Pipe = " << Pipe[1]);
} |
To:
Code Block | ||
---|---|---|
| ||
void APPcreateNonblockingPipe(int Pipe[2]){ BAS_FUNCTION(APPcreateNonblockingPipe); if (-1 == pipe(Pipe)) { BASerrorMessage(errno); } if (-1 == fcntl(Pipe[0], F_SETFL, O_NONBLOCK)) { BASerrorMessage(errno); } if (-1 == fcntl(Pipe[1], F_SETFL, O_NONBLOCK)) { BASerrorMessage(errno); } BAS_TRC("Read Pipe = " << Pipe[0] << " Write Pipe = " << Pipe[1]); } |