SIGTERM graceful shutdown

Bug #1203791 reported by Bill Erickson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenSRF
New
Undecided
Unassigned

Bug Description

In OpenSRF today, receiving a TERM signal causes the listener process to immediately kill all child processes, regardless of whether they are servicing requests. The TERM signal should be handled more gracefully, though. Child processes should be given a chance to complete their currently running task and cleanly shut down.

My proposed signal handling:

TERM -- de-register router, followed by graceful child process cleanup

QUIT/INT - de-register router, immediately kill children

KILL - standard, non-graceful, everything dies now. (We have no control over this).

-----
Here is a patch to implement this in Perl : working/user/berick/sigterm-graceful-shutdown

A similar patch for C is in progress.

Tags: pullrequest
Revision history for this message
Bill Erickson (berick) wrote :

Code for C pushed to working/user/berick/lp1203791-sigterm-shutdown-in-c

This code relies on parts of the C code from bug #1193473, specifically the router un-register logic. Bug #1193473 should be considered a prereq for this bug (or we need to refactor some C code to split them out).

tags: added: pullrequest
Changed in opensrf:
milestone: none → 2.2.0
assignee: Bill Erickson (erickson-esilibrary) → nobody
status: In Progress → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.