I assume I completely misunderstand how this example code should work. My apologizes in advance.
I built the signal-handling.go example without any modifications. Both for MacOS 12.6 and Ubuntu 22.04.1 LTS.
I execute: ./daemon and the app 'ghosts' into the background. I checked with 'Activity Monitor' (MacOS) and 'htop' (Ubuntu).
Next I execute ./daemon reload and I get Resource temporarily unavailable
Whatever command I try (reload, stop or quit), the only result is Resource temporarily unavailable.
Sending signals like SIGHUP and SIGINT using the OS itself does have the expected result.
So what is the purpose of adding the commands as app arguments?