Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147979185
D36207.1784993683.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
855 B
Referenced Files
None
Subscribers
None
D36207.1784993683.diff
View Options
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -307,8 +307,8 @@
static int
fork_norfproc(struct thread *td, int flags)
{
- int error;
struct proc *p1;
+ int error;
KASSERT((flags & RFPROC) == 0,
("fork_norfproc called with RFPROC set"));
@@ -340,15 +340,16 @@
}
error = vm_forkproc(td, NULL, NULL, NULL, flags);
- if (error)
+ if (error != 0)
goto fail;
/*
* Close all file descriptors.
*/
- if (flags & RFCFDG) {
+ if ((flags & RFCFDG) != 0) {
struct filedesc *fdtmp;
struct pwddesc *pdtmp;
+
pdtmp = pdinit(td->td_proc->p_pd, false);
fdtmp = fdinit();
pdescfree(td);
@@ -360,7 +361,7 @@
/*
* Unshare file descriptors (from parent).
*/
- if (flags & RFFDG) {
+ if ((flags & RFFDG) != 0) {
fdunshare(td);
pdunshare(td);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 25, 3:34 PM (16 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29257127
Default Alt Text
D36207.1784993683.diff (855 B)
Attached To
Mode
D36207: Yet another round of fixes for REAP_KILL
Attached
Detach File
Event Timeline
Log In to Comment