File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -203,8 +203,9 @@ class ChildProcess extends Process {
203203
204204/**
205205 * Parent process wrapper that spawns the child process and performs a handshake
206- * with it. Will relaunch the child if it receives a SIGUSR1 or is asked to by
207- * the child. If the child otherwise exits the parent will also exit.
206+ * with it. Will relaunch the child if it receives a SIGUSR1 or SIGUSR2 or is
207+ * asked to by the child. If the child otherwise exits the parent will also
208+ * exit.
208209 */
209210export class ParentProcess extends Process {
210211 public logger = logger . named ( `parent:${ process . pid } ` )
@@ -227,6 +228,11 @@ export class ParentProcess extends Process {
227228 this . relaunch ( )
228229 } )
229230
231+ process . on ( "SIGUSR2" , async ( ) => {
232+ this . logger . info ( "Received SIGUSR2; hotswapping" )
233+ this . relaunch ( )
234+ } )
235+
230236 const opts = {
231237 size : "10M" ,
232238 maxFiles : 10 ,
You can’t perform that action at this time.
0 commit comments