Shell:nohup Daemon Process

Source: Internet
Author: User

If you want to start a shell script in a terminal session, and then have the script run in background mode until it finishes, you can use the Nohup command, even if you quit the terminal session. The feeling of Nohup is to initialize a process to a daemon . The nohup command runs another command to block all sighup signals sent to the process. This prevents the process from exiting when it exits the terminal session.

Because the Nohup command will disassociate the process from the terminal, the process will lose the link to stdout and stdin, and in order to save the output generated by the command, the Nohup command will automatically redirect stdout and stderr messages to a file named Nohup.out.
************************************************************************************
The demo script is as follows, very simple:

===============================================
The command format executed is: nohup ./tmp.bash&, output will go to Nohup.out
Reprinted from: http://blog.sina.com.cn/s/blog_ac9fdc0b0101pciy.html

Shell:nohup Daemon Process

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.