]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
wc: Fix SIGINFO race with casper init.
authorBryan Drewery <bdrewery@FreeBSD.org>
Sun, 18 Feb 2024 18:55:11 +0000 (10:55 -0800)
committerBryan Drewery <bdrewery@FreeBSD.org>
Sun, 18 Feb 2024 18:57:42 +0000 (10:57 -0800)
commitd0bf8b5aaccbe082d3728279620b8f8474d9ca8a
tree68b16a4b240d97a1c5f7a5298ec3dfe1fa3b2108
parenta890a3a5ddf33acb0a4000885945b89156799b07
wc: Fix SIGINFO race with casper init.

If a file is specified then fileargs_init(3) may return [EINTR]. With
the SIGINFO handler not being SA_RESTART this causes an early exit
if a SIGINFO comes in. Rather than checking for [EINTR] or changing the
handler just move it later which resolves the problem.
usr.bin/wc/wc.c