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 have used nohup with great success in the past to launch a process on remote server and not have it killed when I close my ssh connection. but it does not work with vite. here is my command:
nohup ./run.sh &
where run.sh contains:
npm run dev -- --host 0.0.0.0 > output.log 2>&1
where package.json contains:
"scripts": {
"dev": "vite dev",
Expected
vite server should start and keep running even after ssh connection to the machine is lost
Observed
vite server starts but gets killed if the ssh connection to the machine is lost
More Notes
If I close the ssh connection by typing exit the application is not killed. But closing the ssh window or broken pipe kills the process. I also saw this thread and this is what I get:
if this big-endian hexadecimal number has its first (least-significant) bit set (that is, the final digit is one of 1, 3, 5, 7, 9, B, D, or F), then SIGHUP is ignored.
meaning app should not be killed on broken pipe etc.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have used
nohup
with great success in the past to launch a process on remote server and not have it killed when I close my ssh connection. but it does not work with vite. here is my command:where
run.sh
contains:where
package.json
contains:Expected
vite server should start and keep running even after ssh connection to the machine is lost
Observed
vite server starts but gets killed if the ssh connection to the machine is lost
More Notes
If I close the ssh connection by typing
exit
the application is not killed. But closing the ssh window or broken pipe kills the process. I also saw this thread and this is what I get:so according to that answer:
meaning app should not be killed on broken pipe etc.
can someone tell me how to make it work? thanks.
ref [1,2,3]
Beta Was this translation helpful? Give feedback.
All reactions