MyTetra Share
Делитесь знаниями!
How to run process as background and never die?
Время создания: 26.09.2017 09:49
Текстовые метки: linux cli terminal process background
Раздел: Linux
Запись: Velonski/mytetra-database/master/base/1506401348di19d1ujqv/text.html на raw.githubusercontent.com

nohup node server.js > /dev/null 2>&1 &

  1. nohup means: Do not terminate this process even when the stty is cut off.
  2. > /dev/null means: stdout goes to /dev/null (which is a dummy device that does not record any output).
  3. 2>&1 means: stderr also goes to the stdout (which is already redirected to /dev/null). You may replace &1 with a file path to keep a log of errors, e.g.: 2>/tmp/myLog
  4. & at the end means: run this command as a background task.
Так же в этом разделе:
 
MyTetra Share v.0.65
Яндекс индекс цитирования