unix - How to daemonize process? -
On my hosting account, I run a chat in node. All work is fine but my hosting time is limited every 12 hours. Clearly, when this process is deamonized, this time will not end and therefore I tried to demonize with this:
-
using Forever.js - Running
Always start chat.js . RunningAlways List Confirms this run and shows theps -ef command? In the TTI columnTryed
NoHoop node chat.js - Runningps -ef TTY columnPts / 0 and PPID1I tried to disconnect stdin, stdout, and stderr, and hangup it Ignored the signal (SIGHUP) then the
nohup ./mycript 0 & lt; & Amp; - & amp; & Gt; My.admin.log.file & amp; There is no luck withps -ef TTY columnpts / 0 and pid is anything but1I tried
(nohup. / Myscript 0 & lt; & amp; gt; my.admin.log.file & amp;) There is no luck withps -ef TTY columnpts / 0 and PPID1After this all the process is always timeout in approximately 12 hours.
I now tried
(nohup. / Myscript 0 & lt; & amp;; my.admin.log.file & amp;) And I'm waiting, but do not keep my hopes and do not need any help.The hosting people claim that the Damon processes do not end time, but how can I ensure that my process is a daemon? For the attention I have tried, though my limited understanding seems to work with the suggestion of
ps -ef that the process is deamonized.What should I do to demonize the process without moving to more expensive hosting plans? Can I argue with the host that after all these bonds are a daemon and they just got the wrong?
An easy way to demo upstream processes
There is some information in it with this node and monit, which will restart the node for you if it crashes
Comments
Post a Comment