Summary: | SIPServer does not respond correctly to signals | ||
---|---|---|---|
Product: | Koha | Reporter: | Colin Campbell <colin.campbell> |
Component: | SIP2 | Assignee: | Colin Campbell <colin.campbell> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | colin.campbell, kyle, m.de.rooy, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Proposed path
Bug 12263 Fix startup issues blocking response to HUP [PASSED QA] Bug 12263 Fix startup issues blocking response to HUP |
Description
Colin Campbell
2014-05-15 11:18:32 UTC
Created attachment 28278 [details] [review] Proposed path To test: In order to easily get the pid of the controlling process add pid_file='/tmp/sippid' option to the servers section of your SIPConfig, this saves you from having to look at ps or equivalent to get the relevant pid `cat /tmp/sippid` will return it. The sip server will update the file and remove it on a clean shutdown. If not running the process as root, designate a location writable by the running process. While running kill -s HUP sippid will restart all children of server (in ps view the pids of the child processes will have changed) ( it reattaches the socket it is listening on) kill -s QUIT sippid will shutdown the server and its children Created attachment 28720 [details] [review] Bug 12263 Fix startup issues blocking response to HUP If you do a kill -s HUP sipserver_pid the server process should restart its children. This was not happening although it was logging the commencement of the process. Removed traces of Exporter usage this was always incorrect this program inherits from Net::Server 'use base' to make inheritance clearer. Removed unnecessary begin block made file executable so it can run added a shebang line so OS knows to invoke perl to compile and run the file. I've removed the debug code dumping the config to STDOUT, it should not have gone into the production version. One of the first things this program does is close stdout etc and reopens the sip sockets to them. Assuming you can print to them other than as part of the sip dialogue is not always safe. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 29117 [details] [review] [PASSED QA] Bug 12263 Fix startup issues blocking response to HUP If you do a kill -s HUP sipserver_pid the server process should restart its children. This was not happening although it was logging the commencement of the process. Removed traces of Exporter usage this was always incorrect this program inherits from Net::Server 'use base' to make inheritance clearer. Removed unnecessary begin block made file executable so it can run added a shebang line so OS knows to invoke perl to compile and run the file. I've removed the debug code dumping the config to STDOUT, it should not have gone into the production version. One of the first things this program does is close stdout etc and reopens the sip sockets to them. Assuming you can print to them other than as part of the sip dialogue is not always safe. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Should the status of this report be already Passed QA? Looking at the attachment name and two sign-offs.. Yep! (In reply to M. de Rooy from comment #4) > Should the status of this report be already Passed QA? > Looking at the attachment name and two sign-offs.. Patch pushed to master. Thanks Colin! |