]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Improve signal init and shutdown.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 7 Oct 2014 19:56:01 +0000 (19:56 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 19 Feb 2015 08:40:03 +0000 (09:40 +0100)
Currently all users of the signal subsystem define their own
signal_task structure and initialize the ->fd field from the return
value of para_signal_init(). It is more natural to let the signal
subsystem perform the allocation and the initialization.

This commit renames para_signal_init() to signal_init_or_die() and
changes the function to allocate, initialize and return a signal
task structure (rather than only the file descriptor of the signal
pipe as para_signal_init() did). Similarly, para_signal_shutdown()
is renamed to signal_shutdown() and now takes a pointer to the
signal_task structure which was obtained in an earlier call to
signal_init_or_die(), and frees it. Conversion of all users is
straight forward.

The patch also adds a missing call to signal_shutdown() to audiod.c,
closing an fd leak.


No differences found