Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-288] SIGINT triggered in core process

GitHub Issuen/a
Resolution Date2019-10-25T20:20:24.000+0000
Affected Version/sn/a
Fix Version/sAppc Daemon 3.1.0
Componentsappcd, appcd-nodejs
ReporterChris Barber
AssigneeChris Barber


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.


  1. Chris Barber 2019-10-25

    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
       // On macOS (and probably Linux), a detached process doesn't stick around to see
       // if the executable exited with an error, so we must not detach the process,
       // but rather disconnect it once the daemon is booted. On Windows, we have to
       // detach it to keep the process running and for some lucky reason, Node sticks
       // around to see if the executable errors.
       detached: process.platform === 'win32' ? detached : false,
    This seemingly unknown behavior was actually caused by appcd-nodejs forcing all detached processes to be unref()'d which in turned caused the child process "close" event to never be emitted.
  2. Chris Barber 2019-10-25

    PR: https://github.com/appcelerator/appc-daemon/pull/438

JSON Source