Program job management-background operation management 2

Source: Internet
Author: User
Program job management-background operation management 2 program job management-background operation management http://www.2cto.com/os/201303/192121.html 1. when nohup is executed in ssh, the parent process is sshd. if you do not press ctrl + c, the parent process is directly disabled, and the parent process is automatically changed to 1. Will automatically... Program job management-background operation management 2 program job management-background operation management http://www.2cto.com/os/201303/192121.html 1. when nohup is executed in ssh, the parent process is sshd. if you do not press ctrl + c, the parent process is directly disabled, and the parent process is automatically changed to 1. The output file nohup is automatically generated. out, you can also redirect another File> filename 2> & 1 2. setsid usage is the same as nohup, followed by the command. The difference is: direct display, parent ID is 1, you can directly turn it off and enter the background. ctrl + c cannot be canceled. 3. the effect is the same as that of setsid [root @ pvcent107 ~] through the () sub-shell method. # (Ping www.ibm.com &) [root @ pvcent107 ~] # Ps-ef | grep www.ibm.com root 16270 1 0 00:00:00 pts/4 00:00:00 ping www.ibm.com root 16278 15362 0 pts/4 grep www.ibm.com 4, however, in shell subprograms, programs that run on the front end before disown will end when the session is disconnected should be run in the background. Use disown-h jobspec to make a job ignore the HUP signal. Use disown-ah to make all jobs ignore the HUP signal. Use disown-rh to ignore the HUP signal for running jobs. If "&" has been used to run the command in the background when you submit the command, you can directly use "disown". if "&" is not used to run the command in the background when you submit the command, you can use CTRL-z and "bg" to put them in the background, use the "disown" disown example [root @ pvcent107 build] # cp-r testLargeFile largeFile & [1] 4825 [root @ pvcent107 build] # jobs [1] + Running cp-I -r testLargeFile largeFile & [root @ pvcent107 build] # disown-h % 1 [root @ pvcent107 build] # ps-ef | grep largeFile root 4825 968 1 00:00:00 pts/4 cp -I-r testLargeFile largeFile root 4853 968 0 00:00:00 pts/4 grep largeFile
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.