Hi guys,
I have a program which has the possibility of doing a shutdown or reboot remotely by doing a popen("reboot") or popen("halt") call after doing some cleanup.
I have found that if I execute the application directly from the command line, this works and the shutdown or reboot takes place immediately. However if I try it when the program has been automatically executed on startup through a systemd script, there is a really long delay (a little more than one minute) before it works.
Does anybody here know why this might be, and if there is any way to work around it? Or is this a question I should ask on a Linux group somewhere rather than here?