Page MenuHomeFreeBSD

D42713.diff
No OneTemporary

D42713.diff

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

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)

Event Timeline