Date: Tue, 02 May 2006 03:20:03 +0300 From: Alin-Adrian Anton <aanton@spintech.ro> To: freebsd-hackers@freebsd.org Subject: which running thread gests the external signal Message-ID: <4456A5B3.2010809@spintech.ro>
next in thread | raw e-mail | index | archive | help
Hi Hackers, I'm working on a threaded daemon and I'm trying to make it sysadmin friendly. For this, I'm working with external signals. I noticed different behaviour between BSD and Linux for this. When I send an external SIGHUP (rehashing the config file) on BSD the thread receiving the signal seems to be "random". On Linux, if I remeber well, all the threads get the signal, sooner or later.. (the signal handler gets executed as many times as the number of running threads) The tests I've done were done some time ago, this is why I must appologise if I get the chance to mix the memories :|. So just in case anyone already knows (on BSD): which thread gets stopped and moves execution to the signal handler function, when the signal is sent by kill(1) to the pid of the daemon, which is the same for all the threads? (sorry if dizzy speaking) And also, is there a way for delegating one special thread to handle all the external signals? (on BSD) Thanks for the time guys. Yours Sincerely, -- Alin-Adrian Anton GPG keyID 0x183087BA (B129 E8F4 7B34 15A9 0785 2F7C 5823 ABA0 1830 87BA) gpg --keyserver pgp.mit.edu --recv-keys 0x183087BA "It is dangerous to be right when the government is wrong." - Voltaire
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4456A5B3.2010809>