- 执行setsid ping www.baidu.com 虽然有输出,但此进程却不会因为终端的终止而终止
- 执行 setsid ./test.sh 虽然有输出,但此进程却不会因为终端的终止而终止
#!/usr/bin/env bash
while true
do
sleep 1
echo 'aaa'
done
- 执行setsid php test.php 当脚本有输出时,脚本进程会随着终端的结束而结束,但没有输出或输出重定向时却不会,请问为什么
<?php
while (true){
//echo time()."\n";
sleep(1);
}