小编rid*_*ish的帖子

What should interactive shells do in orphaned process groups?

(Re-posting in unix per the suggestion in /sf/ask/960287611/)

The short question is, what should a shell do if it is in an orphaned process group that doesn't own the tty? But I recommend reading the long question because it's amusing.

Here is a fun and exciting way to turn your laptop into a portable space heater, using your favorite shell (unless you're one of those tcsh weirdos):

#include <unistd.h>   
int main(void) {
    if (fork() == 0) {
        execl("/bin/bash", "/bin/bash", …
Run Code Online (Sandbox Code Playgroud)

shell process signals tty process-groups

10
推荐指数
1
解决办法
1137
查看次数

标签 统计

process ×1

process-groups ×1

shell ×1

signals ×1

tty ×1