You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While developing, it is common to send signals to the process.
One example is opening a terminal and executing e.g. listhen -w index.ts. To be able to use the terminal again, the program must be interrupted with Ctrl + C which sends a SIGINT to the process.
While the program is running (listhen -w index.ts) in a terminal and the terminal gets closed, then a SIGHUP is send to the process.
And when a process is killed the default sent signal is SIGTERM.
When receiving one of these signals (INT/TERM/HUP) the process's exit event will not get fired, and so, also no cleanup (close()) will be executed.
To properly auto-close on these specific signals, it's enough to fire an exit event when a signal is trapped.
Additional information
Would you be willing to help implement this feature?
The text was updated successfully, but these errors were encountered:
While developing, it is common to send signals to the process.
One example is opening a terminal and executing e.g.
listhen -w index.ts
. To be able to use the terminal again, the program must be interrupted with Ctrl + C which sends aSIGINT
to the process.While the program is running (
listhen -w index.ts
) in a terminal and the terminal gets closed, then aSIGHUP
is send to the process.And when a process is
kill
ed the default sent signal isSIGTERM
.When receiving one of these signals (
INT/TERM/HUP
) the process's exit event will not get fired, and so, also no cleanup (close()
) will be executed.To properly auto-close on these specific signals, it's enough to fire an
exit
event when a signal is trapped.Additional information
The text was updated successfully, but these errors were encountered: