All base tools should be doing that and I forgot.
While here remove the no longer necessary TERM handler,
it was only needed so a TERM signal would still trigger the END block.
#!/bin/ksh
-# $OpenBSD: fw_update.sh,v 1.38 2022/02/15 08:02:03 espie Exp $
+# $OpenBSD: fw_update.sh,v 1.39 2022/02/19 02:19:42 afresh1 Exp $
#
# Copyright (c) 2021 Andrew Hewus Fresh <afresh1@openbsd.org>
#
perl <<'EOL' |&
use v5.16;
use warnings;
+ no lib ('/usr/local/libdata/perl5/site_perl');
use OpenBSD::PackageInfo qw< lock_db >;
$|=1;
lock_db(0);
- $SIG{TERM} = sub { exit };
say $$;
sleep;