Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Linux 中,前台作业和后台作业有什么区别?
在前台作业中,您的所有输入都被定向到进程stdin(包括SIGINT按 时生成的输入CTRL-C,这就是为什么如果进程在前台,您仍然可以终止该进程的原因)。
stdin
SIGINT
CTRL-C
在后台作业中,您的输入被定向到 shell 进程,这就是您看到 shell 提示并且可以执行命令的原因。