[DAEMON-120] appcd: calling appcd start when daemon is running does not log anything
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2017-11-06T21:55:39.000+0000 |
Affected Version/s | Appc Daemon 1.0.0 |
Fix Version/s | Appc Daemon 1.0.0 |
Components | appcd |
Labels | n/a |
Reporter | Ewan Harris |
Assignee | Ewan Harris |
Created | 2017-11-06T20:37:47.000+0000 |
Updated | 2017-11-06T21:55:39.000+0000 |
Description
Description
When callingappcd 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
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()?
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
https://github.com/appcelerator/appc-daemon/pull/112