Close alarm FDs on fork()
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 30 Sep 2016 20:11:51 +0000 (16:11 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 6 Oct 2016 19:41:48 +0000 (15:41 -0400)
commit2a2afd8e7884cc5f009373b41f3cdd786eb0c91a
tree47d7741b6ca5541cccc4ea3af13c1b8e77c47c54
parentff691c62592ae15be9ddc5ad3e5b9e92c0d8bb78
Close alarm FDs on fork()

If a parent has alarm FDs, forks, but doesn't exec, then its child will
inherit its alarm FDs.  Other than the child being able to mess with the
parent's alarms, which is bad, the parent is unable to fully be freed (as
in __proc_free()) until the child closes the FD - usually by exiting.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/benchutil/alarm.c