sndiod: Fix SIGHUP to reopen the devices in priority order
authorratchov <ratchov@openbsd.org>
Fri, 3 May 2024 05:18:09 +0000 (05:18 +0000)
committerratchov <ratchov@openbsd.org>
Fri, 3 May 2024 05:18:09 +0000 (05:18 +0000)
commit1342ff69531b297b920c3f4a605abb0674201cc9
tree22273c9764c0a1be397c71cf56a41e4a73ecce4a
parent2683028449e0ad8e4c56d66bc0941e661dbfa8f1
sndiod: Fix SIGHUP to reopen the devices in priority order

With this commit, SIGHUP makes sndiod discover new devices and if
there is a new device with higher priority (greater -F option number)
than the current one, sndiod switches to it.  If the current device is
already the one with the highest priority (i.e. last -F), then SIGHUP
does nothing.
usr.bin/sndiod/midi.c
usr.bin/sndiod/midi.h
usr.bin/sndiod/sndiod.c