diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-13 01:36:31 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-13 01:36:31 +0100 |
commit | 97c799576a478d3881bfff1196f0fa829d736994 (patch) | |
tree | fb9d43820e7e65318c2f0e3d9f67932aee3a78ae /LibC/fcntl.h | |
parent | 19b9401487e87dcbb43b52c6fe194e3b0e49f842 (diff) | |
download | serenity-97c799576a478d3881bfff1196f0fa829d736994.zip |
Add close-on-exec flag for file descriptors.
I was surprised to find that dup()'ed fds don't share the close-on-exec flag.
That means it has to be stored separately from the FileDescriptor object.
Diffstat (limited to 'LibC/fcntl.h')
-rw-r--r-- | LibC/fcntl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/LibC/fcntl.h b/LibC/fcntl.h index e0ee379b1d..c717acdc1a 100644 --- a/LibC/fcntl.h +++ b/LibC/fcntl.h @@ -10,6 +10,8 @@ __BEGIN_DECLS #define F_GETFL 3 #define F_SETFL 4 +#define FD_CLOEXEC 1 + int fcntl(int fd, int cmd, ...); __END_DECLS |