[Thread Prev][Thread Next]   >Date Index >Thread Index

[wmx] I think there _is_ a problem w/ using SIGHUP to restart

James Ramsey - Thu Aug 05 18:19:13 1999

I was talking with my dad last night, who unlike me _is_ a programmer
and has been so for 30+ years, and mentioned wmx's scheme for
restarting. He thought SIGHUP would be a bad choice since it is
typically used as a way of telling apps to terminate. I believe it goes
back to the days of timesharing: you dial up, literally, a big server,
do what you need to do with it, and when you're done, you _hang up_ the
connection, which terminates the apps you were running on the server.
Or something like that. The applications that you mentioned that
restart on SIGHUP, like httpd and Apache, are apps for which the SIGHUP
signal is literally meaningful, and are probably doing the Right Thing
(TM). In the case of wmx, if you use SIGHUP to restart, you will
probably end up stepping on something or do something that will confuse
another app. I believe that session managers, for one, use SIGHUP to
terminate the apps in an X session.

SIGUSR1 is probably the appropriate signal to send to wmx to tell it to
restart. It's an application-defined signal that has no meaning other
than the one that the application gives it. It won't step on anything,
period.


===


----I am a fool for Christ. Mostly I am a fool.----

_____________________________________________________________
Do You Yahoo!?
Free instant messaging and more at http://messenger.yahoo.com



Next: