library/src/filesystem/BP-Filesystem.cc
int BP_FSetNonBlockingIO(P_BP_FDSET fds)
{

    // set all pipes to non blocking
    int flags = 0;

    if(!fds->forkpty_master)

    // set nonblock on stdin
    flags = fcntl(fds->stdin[1], F_GETFL, 0);
    fcntl(fds->stdin[1], F_SETFL, flags | O_NONBLOCK);

    // set nonblock on stdout
    flags = fcntl(fds->stdout[0], F_GETFL, 0);
    fcntl(fds->stdout[0], F_SETFL, flags | O_NONBLOCK);

    // set nonblock on stderr
    flags = fcntl(fds->stderr[0], F_GETFL, 0);
    fcntl(fds->stderr[0], F_SETFL, flags | O_NONBLOCK);

    // return indicating success
    return ERR_SUCCESS;

}
// Set nonblocking on file descriptors after program is executed
// (mainly used for command and control interface) NEVER FAILS.
Set nonblocking on file descriptors after program is executed
(mainly used for command and control interface) NEVER FAILS.
Set nonblocking on file descriptors after program is executed ( mainly used for command and control interface ) NEVER FAILS .
int BP_FSetNonBlockingIO(P_BP_FDSET fds)
{
    int flags = 0;
    if(!fds->forkpty_master)
    flags = fcntl(fds->stdin[1], F_GETFL, 0);
    fcntl(fds->stdin[1], F_SETFL, flags | O_NONBLOCK);
    flags = fcntl(fds->stdout[0], F_GETFL, 0);
    fcntl(fds->stdout[0], F_SETFL, flags | O_NONBLOCK);
    flags = fcntl(fds->stderr[0], F_GETFL, 0);
    fcntl(fds->stderr[0], F_SETFL, flags | O_NONBLOCK);
    return ERR_SUCCESS;
}
int BP_FSetNonBlockingIO ( P_BP_FDSET fds ) { int flags = 0 ; if ( ! fds -> forkpty_master ) flags = fcntl ( fds -> stdin [ 1 ] , F_GETFL , 0 ) ; fcntl ( fds -> stdin [ 1 ] , F_SETFL , flags | O_NONBLOCK ) ; flags = fcntl ( fds -> stdout [ 0 ] , F_GETFL , 0 ) ; fcntl ( fds -> stdout [ 0 ] , F_SETFL , flags | O_NONBLOCK ) ; flags = fcntl ( fds -> stderr [ 0 ] , F_GETFL , 0 ) ; fcntl ( fds -> stderr [ 0 ] , F_SETFL , flags | O_NONBLOCK ) ; return ERR_SUCCESS ; }
Set nonblocking on file descriptors after program is executed
(mainly used for command and control interface) NEVER FAILS.
Set nonblocking on file descriptors after program is executed ( mainly used for command and control interface ) NEVER FAILS .
// set all pipes to non blocking // set nonblock on stdin // set nonblock on stdout // set nonblock on stderr // return indicating success