Module Name: src Committed By: martin Date: Mon Jun 14 11:22:16 UTC 2021
Modified Files: src/usr.bin/ftp [netbsd-9]: ftp.c version.h Log Message: Pull up following revision(s) (requested by lukem in ticket #1290): usr.bin/ftp/version.h: revision 1.90 usr.bin/ftp/ftp.c: revision 1.170 ftp.c: improve signal handler restoration Only invoke the old signal handler if it's a real signal handler and not SIG_IGN, SIG_DFL, SIG_HOLD, or SIG_ERR, using new static function issighandler(). Avoids an intermittent race condition with a null pointer dereference via (*SIG_DFL)(). Bug class reported by Joyu Liao from Juniper Networks. Use SIG_ERR instead of NULL as the indicator that a signal handler hasn't been changed, so that SIG_DFL (equivalent to NULL) will be restored. To generate a diff of this commit: cvs rdiff -u -r1.168.2.1 -r1.168.2.2 src/usr.bin/ftp/ftp.c cvs rdiff -u -r1.87.18.1 -r1.87.18.2 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.