[DAEMON-288] SIGINT triggered in core process
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2019-10-25T20:20:24.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Appc Daemon 3.1.0 |
Components | appcd, appcd-nodejs |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2019-10-25T19:26:07.000+0000 |
Updated | 2019-10-25T20:20:24.000+0000 |
Description
When a process spawns
appcd start
, then that process is interrupted via CTRL-C (aka SIGINT), then the core daemon process receives the SIGINT also and shutsdown. The daemon should not be receiving the SIGINT.
SIGINT is propagated to the spawned core process because it's not detached on macOS and Linux. The core was set to not detach in this commit: https://github.com/appcelerator/appc-daemon/commit/00892d87a78e405c1173a6a2164ea9901b0d9b7b#diff-30dc100d38263dd48fd4dd7ae14e0f3c
This seemingly unknown behavior was actually caused by
appcd-nodejs
forcing all detached processes to beunref()
'd which in turned caused the child process"close"
event to never be emitted.PR: https://github.com/appcelerator/appc-daemon/pull/438