File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -203,8 +203,9 @@ class ChildProcess extends Process {
203
203
204
204
/**
205
205
* 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.
208
209
*/
209
210
export class ParentProcess extends Process {
210
211
public logger = logger . named ( `parent:${ process . pid } ` )
@@ -227,6 +228,11 @@ export class ParentProcess extends Process {
227
228
this . relaunch ( )
228
229
} )
229
230
231
+ process . on ( "SIGUSR2" , async ( ) => {
232
+ this . logger . info ( "Received SIGUSR2; hotswapping" )
233
+ this . relaunch ( )
234
+ } )
235
+
230
236
const opts = {
231
237
size : "10M" ,
232
238
maxFiles : 10 ,
You can’t perform that action at this time.
0 commit comments