tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: patch adding a pidfile-option to script(1)
Date: Wed, 16 Sep 2026 16:52:27 +0200
From: Timo Buhrmester <timo%math.uni-bonn.de@localhost>
Message-ID: <aqqtKwMae0ge2_o8%math.uni-bonn.de@localhost>
| I'm not asking for this to be merged into NetBSD, but I also wouldn't
| mind. Maybe somebody finds it useful.
It wouldn't be merged as is anyway - the -P option by itself is
harmless, but the way the SIGUSR1 handling is coded won't work in
general - signal handlers should only ever call async signal safe
functions, and neither fopen() nor fclose() is that (fflush() I'm
not sure about).
Signal handlers generally (if they don't just do somemething simple)
need to just set a flag, and then have the mainline code test for
that flag being set, and do the work then - at a time it is safe
(and desirable) for that to happen.
kre
Home |
Main Index |
Thread Index |
Old Index