aboutsummaryrefslogtreecommitdiffhomepage
path: root/wutil.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-04-07 12:40:08 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-04-07 12:40:08 -0700
commit437b4397b9cf273922ce7b414bf6626845f15ad0 (patch)
tree8c5fbb6a7196146b5656629f8c37f4eb1d3ecd80 /wutil.h
parent3a7ab3f030eda29ecbe54c0f44732e471300a3ed (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.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/wutil.h b/wutil.h
index 396412c9..347e7313 100644
--- a/wutil.h
+++ b/wutil.h
@@ -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);