which running thread gests the external signal

Alin-Adrian Anton aanton at spintech.ro
Tue May 2 00:20:04 UTC 2006

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

More information about the freebsd-hackers mailing list