[Gambas-bugtracker] Bug #2388: writing large data string to pipe causes gambas app to hang

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Sat Oct 30 07:41:08 CEST 2021


Comment #5 by Brian G:

To specify non-blocking option:
       int fd; 
       fcntl(fd, F_SETFL, O_NONBLOCK); 
fd: file descriptor
F_SETFL: Set the file status flags to the value specified by arg. File access mode here in our purpose use only for O_NONBLOCK flag.
O_NONBLOCK: use for non-blocking option.
0: return on successful
-1: return on error, set errorno
After this function runs successfully, a call to read/write returns -1 if pipe 
is empty/full and sets errno to EAGAIN

More information about the Bugtracker mailing list