summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-12-19 16:53:39 +0000
committerZefram <zefram@fysh.org>2017-12-22 16:13:23 +0000
commit74df577f6857d2d8543c90e43f90405f92948a61 (patch)
treeaf79ab48854bb2583b061679690f55c33ce0115f /embed.fnc
parentf9821aff984443d5ac38188fab7a9b12dd3cb09c (diff)
downloadperl-74df577f6857d2d8543c90e43f90405f92948a61.tar.gz
set FD_CLOEXEC atomically in easy cases
In many places where a file descriptor is being opened, open it with FD_CLOEXEC already set if possible. This commit covers the easy cases, where the file descriptor arises without the use of PerlIO, pp_open, or my_popen.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc3
1 files changed, 3 insertions, 0 deletions
diff --git a/embed.fnc b/embed.fnc
index a434bf847e..b768861089 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -464,6 +464,9 @@ Apmb |bool |do_open |NN GV* gv|NN const char* name|I32 len|int as_raw \
Ap |bool |do_open9 |NN GV *gv|NN const char *name|I32 len|int as_raw \
|int rawmode|int rawperm|NULLOK PerlIO *supplied_fp \
|NN SV *svs|I32 num
+p |void |setfd_cloexec|int fd
+p |void |setfd_inhexec|int fd
+p |void |setfd_inhexec_for_sysfd|int fd
pR |int |PerlLIO_dup_cloexec|int oldfd
pR |int |PerlLIO_dup2_cloexec|int oldfd|int newfd
pR |int |PerlLIO_open_cloexec|NN const char *file|int flag