diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-04-07 12:40:08 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-04-07 12:40:08 -0700 |
commit | 437b4397b9cf273922ce7b414bf6626845f15ad0 (patch) | |
tree | 8c5fbb6a7196146b5656629f8c37f4eb1d3ecd80 /wutil.h | |
parent | 3a7ab3f030eda29ecbe54c0f44732e471300a3ed (diff) |
Mark stdin as nonblocking if we get EWOULDBLOCK, and before handing it off to child processes when either starting them or moving them to the foreground.
Diffstat (limited to 'wutil.h')
-rw-r--r-- | wutil.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -48,9 +48,13 @@ int wopen(const wcstring &pathname, int flags, mode_t mode = 0); /** Wide character version of open() that also sets the close-on-exec flag (atomically when possible). */ int wopen_cloexec(const wcstring &pathname, int flags, mode_t mode = 0); -/** - Wide character version of creat(). -*/ +/** Mark an fd as nonblocking; returns errno or 0 on success */ +int make_fd_nonblocking(int fd); + +/** Mark an fd as blocking; returns errno or 0 on success */ +int make_fd_blocking(int fd); + +/** Wide character version of creat(). */ int wcreat(const wcstring &pathname, mode_t mode); |