mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:58:11 +00:00

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.
17 lines
212 B
C
17 lines
212 B
C
#pragma once
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
__BEGIN_DECLS
|
|
|
|
#define F_DUPFD 0
|
|
#define F_GETFD 1
|
|
#define F_SETFD 2
|
|
#define F_GETFL 3
|
|
#define F_SETFL 4
|
|
|
|
#define FD_CLOEXEC 1
|
|
|
|
int fcntl(int fd, int cmd, ...);
|
|
|
|
__END_DECLS
|