diff options
| author | thorpej <thorpej@NetBSD.org> | 2001-07-18 05:34:37 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2001-07-18 05:34:37 +0000 |
| commit | 35c5abaeff6d548ee59e819e92f7e2bcf2d9c7da (patch) | |
| tree | 47aa5a006297fda778aa9727201c270e837250a0 | |
| parent | c0e6fdedfc3ef99da7e5346013644fb3621d224b (diff) | |
Unshare the file descriptor table and `cwdinfo' when we exec.
From Matthew Orgass <darkstar@pgh.net>.
| -rw-r--r-- | sys/kern/kern_descrip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 94c49f33c2f..bae83521d5d 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_descrip.c,v 1.79 2001/07/01 18:12:00 thorpej Exp $ */ +/* $NetBSD: kern_descrip.c,v 1.80 2001/07/18 05:34:37 thorpej Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991, 1993 @@ -1363,6 +1363,9 @@ fdcloseexec(struct proc *p) struct filedesc *fdp; int fd; + fdunshare(p); + cwdunshare(p); + fdp = p->p_fd; for (fd = 0; fd <= fdp->fd_lastfile; fd++) if (fdp->fd_ofileflags[fd] & UF_EXCLOSE) |
