]> git.tuebingen.mpg.de Git - adu.git/commit
Fix check for return value of catch_signal().
authorAndre Noll <maan@systemlinux.org>
Mon, 25 Jun 2012 18:48:53 +0000 (20:48 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 25 Jun 2012 18:48:53 +0000 (20:48 +0200)
commitc6efe1f82dce725cbf20ca56a6d9e4e493351acd
tree5650c56f3f3adcd99bb68d8e584f1266cd6c46fa
parenta134d110dad79ec350f6883d473f29beadb06abe
Fix check for return value of catch_signal().

Commit 2d7a4d61 made adu's signal handling portable by switching from
signal() to sigaction() for installing signal handlers.  This commit
added the new function catch_signal() which returns the return value
of the underlying call to sigaction(), i.e. zero on success, and -1
on errors.

However, embarrassingly enough, one caller of catch_signal() still
checked this return value against SIG_ERR, which is the value that
is returned from signal() on errors.

Fix this bug by testing the return value against zero.
adu.c