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
I discovered that if my node script was launched with any Node CLI flags such as --enable_gc (which exposes the internal Node Garbage Collector), this flag does not pass down to the daemon fork. Example:
node --enable_gc mydaemon.js
I see that internal node flags are not included on the process.argv array, so there is apparently no way the daemon module can preserve them.
I worked around this by detecting the presence of global.gc and then splicing the --enable_gc flag back into the process.argv array just before calling daemon:
I discovered that if my node script was launched with any Node CLI flags such as
--enable_gc
(which exposes the internal Node Garbage Collector), this flag does not pass down to the daemon fork. Example:I see that internal node flags are not included on the
process.argv
array, so there is apparently no way the daemon module can preserve them.I worked around this by detecting the presence of
global.gc
and then splicing the--enable_gc
flag back into theprocess.argv
array just before calling daemon:- Joe
The text was updated successfully, but these errors were encountered: