freebsd-src/usr.bin/lockf
Alexander Melkov 159d922f4c lockf: don't hold stdin/stdout/stderr open
None of these are essential in the lockf monitor (parent post-fork), so
close them to maintain the illusion that lockf hasn't been inserted into
the pipeline.  This ensures that the correct effects happen on other
programs in the pipeline if the locked command closes or redirects these
elsewhere.

The original patch used -s to close stdout/stderr rather than closing
them unconditionally, but it's not clear that we really care that much.
kevans dropped that part when taking the patch, patch is otherwise by
listed author.

PR:		112379
Reviewed by:	0mp, allanjude (both earlier version), kevans
Feedback from:	des
Sponsored by:	Klara, Inc.

(cherry picked from commit 18425c19ca)
2023-12-14 18:59:18 -06:00
..
lockf.1 Remove $FreeBSD$: two-line nroff pattern 2023-08-23 11:43:31 -06:00
lockf.c lockf: don't hold stdin/stdout/stderr open 2023-12-14 18:59:18 -06:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00