Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-120] appcd: calling appcd start when daemon is running does not log anything

GitHub Issuen/a
TypeBug
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2017-11-06T21:55:39.000+0000
Affected Version/sAppc Daemon 1.0.0
Fix Version/sAppc Daemon 1.0.0
Componentsappcd
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2017-11-06T20:37:47.000+0000
Updated2017-11-06T21:55:39.000+0000

Description

Description

When calling appcd start when the daemon is already running, the process just exits with no logging, it also appears that the appropriate error code is not set (although I think this could be a separate issue as we don't appear to process.exit). If I remove the [unref](https://github.com/appcelerator/appc-daemon/blob/master/packages/appcd-nodejs/src/nodejs.js#L435) or [dont spawn as detached](https://github.com/appcelerator/appc-daemon/blob/master/packages/appcd/src/common.js#L152) then I get the correct logging

Comments

  1. Chris Barber 2017-11-06

    Not sure about Windows, but on macOS removing the "detached" fixes the issue and things appear to daemonize as expected. Does Windows still work if we only remove "detached", but leave the unref()?
  2. Ewan Harris 2017-11-06

    I think we added that due to the process not hanging around for the daemon to start? https://github.com/appcelerator/appc-daemon/pull/95
  3. Ewan Harris 2017-11-06

    https://github.com/appcelerator/appc-daemon/pull/112

JSON Source