????????????????????е??????丸????????????shell???????????????????????????hangup??????????????????????hangup????????????????????????shell???????????н????????????nohup????hangup????????setsid?????????????init????(??????1)
$ echo $$
21734
$ nohup ./test.sh &
[1] 29016
$ ps -ef | grep test
515      29710 21734  0 11:47 pts/12   00:00:00 /bin/sh ./test.sh
515      29713 21734  0 11:47 pts/12   00:00:00 grep test
$ setsid ./test.sh &
[1] 409
$ ps -ef | grep test
515        410     1  0 11:49 ?        00:00:00 /bin/sh ./test.sh
515        413 21734  0 11:49 pts/12   00:00:00 grep test
?????????????????????nohup/setsid????&????????????У?????????shell?????????????????????????е??????????????????????disown????
????$ ./test.sh &
????[1] 2539
????$ jobs -l
????[1]+  2539 Running                 ./test.sh &
????$ disown -h %1
????$ ps -ef | grep test
????515        410     1  0 11:49 ?        00:00:00 /bin/sh ./test.sh
????515       2542 21734  0 11:52 pts/12   00:00:00 grep test
????????????????????????????????subshell????У???????setsid??????????????????????????????() ???????????
????$ (./test.sh &)
????$ ps -ef | grep test
????515        410     1  0 11:49 ?        00:00:00 /bin/sh ./test.sh
????515      12483 21734  0 11:59 pts/12   00:00:00 grep test
??????????????黷???Red Hat Enterprise Linux AS release 4 (Nahant Update 5)??shell?/bin/bash???????OS??shell??????????Щ???????????AIX??ksh?????disown????????????nohup -p PID?????disown?????Ч????
?????????????????????????screen????????????????????????????????-r??????????????????????????????е??κ??????????nohup??Ч?????????ж???????????????????е?????????
$ screen -dmS screen_test
$ screen -list
There is a screen on:
27963.screen_test       (Detached)
1 Socket in /tmp/uscreens/S-jiangfeng.
$ screen -r screen_test