summaryrefslogtreecommitdiffstats
path: root/sys/sys/procdesc.h
diff options
context:
space:
mode:
authoroshogbo <oshogbo@FreeBSD.org>2016-06-08 02:09:14 +0000
committeroshogbo <oshogbo@FreeBSD.org>2016-06-08 02:09:14 +0000
commit17ff1e5b262125b4d633e4d2f266a27e83cadb49 (patch)
tree4a66f3894cb509b4c2355cc20ab8eae477485ab2 /sys/sys/procdesc.h
parente454e1cc78f56f1dffde6a1941363ad0cd997a52 (diff)
downloadFreeBSD-src-17ff1e5b262125b4d633e4d2f266a27e83cadb49.zip
FreeBSD-src-17ff1e5b262125b4d633e4d2f266a27e83cadb49.tar.gz
Introduce the PD_CLOEXEC for pdfork(2).
Reviewed by: mjg
Diffstat (limited to 'sys/sys/procdesc.h')
-rw-r--r--sys/sys/procdesc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sys/procdesc.h b/sys/sys/procdesc.h
index 1a3bc98..a9bad27 100644
--- a/sys/sys/procdesc.h
+++ b/sys/sys/procdesc.h
@@ -101,6 +101,9 @@ void procdesc_finit(struct procdesc *, struct file *);
pid_t procdesc_pid(struct file *);
void procdesc_reap(struct proc *);
+int procdesc_falloc(struct thread *, struct file **, int *, int,
+ struct filecaps *);
+
#else /* !_KERNEL */
#include <sys/_types.h>
@@ -127,5 +130,8 @@ __END_DECLS
* Flags which can be passed to pdfork(2).
*/
#define PD_DAEMON 0x00000001 /* Don't exit when procdesc closes. */
+#define PD_CLOEXEC 0x00000002 /* Close file descriptor on exec. */
+
+#define PD_ALLOWED_AT_FORK (PD_DAEMON | PD_CLOEXEC)
#endif /* !_SYS_PROCDESC_H_ */
OpenPOWER on IntegriCloud