Send the SIGHUP signal to a process in Perl

夙愿已清 提交于 2019-12-11 12:03:57

问题


I have a UNIX daemon, which wait of SIGHUP for refresh a data. I try to send a signal from the Perl script (under Apache www-data:www-data on the same server) by Proc::Killall ("killall('HUP', 'mydaemon');"), but I have no properly permissions. suid bit doesn't work too. 'kill -n HUP ' from shell are working.

Does you have any idea to do this?


回答1:


The usual work-around is to employ a »touch file« to indicate a reload, see Apache2::Reload for a real life example.

Listen to notifications set up with e.g. File::ChangeNotify or AnyEvent::Inotify::Simple, then do your reloading.



来源:https://stackoverflow.com/questions/4489343/send-the-sighup-signal-to-a-process-in-perl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!