LoginSignup
11
6

More than 1 year has passed since last update.

Linux: nohupと&の違い

Posted at

nohup& の違い

python test.py というコマンドで説明しますと、

コマンド ctl+c ターミナルを終了
python test.py コマンドが中断される コマンドが中断される
python test.py & コマンドが中断されない コマンドが中断される
nohup python test.py コマンドが中断される コマンドが中断されない
nohup python test.py & コマンドが中断されない コマンドが中断されない

中断されなく残ってしまう場合は、ちゃんと kill しましょう。

ps -ef | grep test.py
kill -9 {pid}

参考記事

Linux 中的 nohup 和&区别

元記事

Linux:nohupと&の違い

11
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
6