]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
Restrict the effective range of SIGUSR2 signal.
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Mon, 13 Jul 2009 03:14:29 +0000 (12:14 +0900)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Sun, 4 Oct 2009 14:36:00 +0000 (20:06 +0530)
commit9d8f0ae5c3b3df6bef2f12738f62397623481090
tree45b12fbd7d0f787a6c4e336417313877da57262f
parent20f79da8f5822b8a5f4eac93dff775b81edcf181
Restrict the effective range of SIGUSR2 signal.

Hi,

If a cgrulesengd daemon receives a SIGUSR2 signal (for reloading rules
configuration) while waiting in select(), a daemon finishes incorrectly
due to an "Interrupted system call" error.
If applying a patch "Add the strings of errno to cgrulesengd daemon's
message." and running `service cgred reload`, you can see the message
"selecting error: Interrupted system call". This patch fixes the problem.

There were some problems the deadlock happens related to a SIGUSR2 signal
and they have been fixed by the followings already:

* [PATCH] Fix the deadlock of vsyslog() call.
  http://libcg.git.sourceforge.net/git/gitweb.cgi?p=libcg;a=commit;h=70111cd03653c3ceab9d907c14fa35e5881b2735
* [PATCH] Fix the deadlock of rl_lock.
  http://libcg.git.sourceforge.net/git/gitweb.cgi?p=libcg;a=commit;h=0241c6f1df5068c006f756005c8e7faa63058c27

The above two patches fixed the problems by protecting the important
codes from receiving a SIGUSR2 signal. But this way was not good, because
the protecting code will be necessary if increasing the important codes.

Instead of protecting the important codes, this patch restricts the
effective range of receiving SIGUSR2 signal. So we will not need to add
a new protecting code by this patch.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
src/daemon/cgrulesengd.c