Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102786276
D42713.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
590 B
Referenced Files
None
Subscribers
None
D42713.diff
View Options
diff --git a/usr.bin/lockf/lockf.c b/usr.bin/lockf/lockf.c
--- a/usr.bin/lockf/lockf.c
+++ b/usr.bin/lockf/lockf.c
@@ -157,8 +157,11 @@
signal(SIGINT, SIG_IGN);
signal(SIGQUIT, SIG_IGN);
signal(SIGTERM, killed);
+ fclose(stdin);
+ fclose(stdout);
+ fclose(stderr);
if (waitpid(child, &status, 0) == -1)
- err(EX_OSERR, "waitpid failed");
+ exit(EX_OSERR);
return (WIFEXITED(status) ? WEXITSTATUS(status) : EX_SOFTWARE);
}
@@ -210,7 +213,7 @@
cleanup();
signal(sig, SIG_DFL);
if (kill(getpid(), sig) == -1)
- err(EX_OSERR, "kill failed");
+ _Exit(EX_OSERR);
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 4:31 AM (22 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14689837
Default Alt Text
D42713.diff (590 B)
Attached To
Mode
D42713: lockf: don't hold stdin/stdout/stderr open
Attached
Detach File
Event Timeline
Log In to Comment