推 yvb: 因為 shell script 中的 background commands, 10/21 22:42
→ yvb: 其 standard input 會被指向 /dev/null . 10/21 22:43
→ shihyuyao: standard input 會被指向 /dev/null會影響 my_fork程式 10/21 23:35
→ shihyuyao: fork 行程出來? 10/21 23:35
→ leolarrel: 不是,yvb的意思是你的重點在於 getchar(); ..... 10/22 14:30
→ leolarrel: 如果你想要讓行程暫停,好讓你可以用ps aux驗證,那你可 10/22 14:32
→ leolarrel: 以用sleep 或做一些無窮回圈的事情 10/22 14:33
推 yvb: 意思就是, stdin 被指向 /dev/null 時, getchar() 不會卡住. 10/22 19:20
→ yvb: 同樣道理, 試試看 sh test2.sh < /dev/null 10/22 19:23