Let the process run in the background of several reliable methods

2010-05-21  来源:本站原创  分类:OS  人气:177 

&
There is also a little tips on the subshell. We know that one or more names included in the "()" These commands in the Jiu Nengrang in the sub-shell in running to extend Chu many interesting features, we have to discuss one of them.

When we "&" also put "()" within, we will find that the work submitted is not in the job list, that is, unable to see through the jobs. Let us see why this can escape the HUP signal of it.

[[email protected] ~]# (ping www.ibm.com &)
[[email protected] ~]# ps -ef |grep www.ibm.com
root     16270     1  0 14:13 pts/4    00:00:00 ping www.ibm.com
root     16278 15362  0 14:13 pts/4    00:00:00 grep www.ibm.com
[[email protected] ~]#

As can be seen from the above example, the parent of the new submission process ID (PPID) is 1 (init process PID), not the current terminal process ID. Therefore, the current terminal does not belong to the sub-process, which also will not be the current terminal of the HUP signal.

Transfer from: http://www.ibm.com/developerworks/cn/linux/l-cn-nohup/

相关文章
  • Linux tip: let the process run in the background of several reliable methods (transfer) 2010-12-02

    We often encounter this problem, use telnet / ssh login the remote Linux server, run a number of time consuming tasks, the result is due to network instability result in the task fail in the middle. How to order submitted by local close the terminal

  • Linux Tips: Let the process run in the background of several reliable methods 2010-06-03

    Transfer from: http://www.ibm.com/developerworks/cn/linux/l-cn-nohup/ Want the process to keep running even after disconnected? If the process has started running, how to remedy? If you have a large number of such demand to streamline operations? <!

  • Let the process run in the background of several reliable methods 2010-05-21

    & There is also a little tips on the subshell. We know that one or more names included in the "()" These commands in the Jiu Nengrang in the sub-shell in running to extend Chu many interesting features, we have to discuss one of them. When w

  • Linux tip: let the process run in the background are several reliable methods 2011-03-11

    We often encounter this problem, use telnet / ssh login the remote Linux server, run some time-consuming task, the result is due to network instability result in mission aborted. How to make the command submitted from the local close the terminal win

  • Linux, how to make the process run in the background 2011-03-23

    In Linux, if you want the process running in the background, under normal circumstances, the command followed by & we can, in fact, this is the command into a job queue: the $. / Test.sh & [1] 17208 $ Jobs-l [1] + 17208 Running. / Test.sh & Fo

  • Script start the program, run in the background 2010-12-31

    Some programs start with the script, sometimes, the script will not exit the program due to start, stuck the script does not move, can not be follow-up operation, where we need to run in the background start (linux) or a new process in the boot (wind

  • Linux with the nohup command to run in the background under the program will never 2011-05-20

    Unix / Linux under the General wanted a program running in the background, many of which are used & in the program at the end to let the program run automatically. For example, we want to run mysql in the background: / Usr / local / mysql / bin / mys

  • shell, the process of foreground and background 2011-01-28

    System tasks associated with a few commands: fg, bg, jobs, &, ctrl + z, ctrl + c 1 & most frequently used in the final with a command, you can put this command into the background 2. Ctrl + z You can execute a command is the foreground into the ba

  • Let the process run under linux cpu on the specified 2011-06-10

    Collection recently responsible for svr pressure is relatively large, somewhat complex business logic, where have all been able to optimize optimized, Currently 3k per second, cpu load is still relatively high top look, a 4-core cpu load is not too b

  • [Change] VC + + in the process of mutual communication of 11 kinds of methods 2010-08-04

    Process is generally defined as a running instance of the program, which consists of two parts: One is the operating system kernel objects used to manage the process. Kernel object is also the system used to store statistical information on the proce

  • I used the Linux command nohup - run other commands, and ignore the SIGHUP signal 2010-12-07

    I used the Linux command nohup - run other commands, and ignore the SIGHUP signal This link: http://codingstandards.iteye.com/blog/835536 (reproduced please indicate the source) Use Description nohup command can be used to execute other commands, and

  • How to end the task to run from the terminal shut down affected 2010-07-01

    http://16.157.69.125:8182/document/YXjSKQIcDl0pZkF9dCC97Q/paginate Recently at work need linux to run a java program to download a bunch of pictures, but each time turn off the terminal, the task also stopped, it is normal, because it was in the same

  • LINUX on behind the scenes in the run command 2010-11-03

    In Linux, if you want the process running in the background, under normal circumstances, the command followed by & we can, in fact, this is the command to a job into a queue: $. / Test.sh & [1] 17208 $ Jobs-l [1] + 17208 Running. / Test.sh & T

  • Taiwan before and after the switch to run linux 2011-03-09

    Shell supports the role of control, the following command: 1. Command & let the process run in the background 2. Jobs running in the background check process 3. Fg% n for n processes running in the background to the foreground 4. Bg% n to n to the ba

  • How to make the task of running the terminal from the terminal closure affected 2010-07-01

    http://16.157.69.125:8182/document/YXjSKQIcDl0pZkF9dCC97Q/paginate Recently at work need linux to run a java program to download a bunch of pictures, but each time turn off the terminal, the task also stopped, it is normal, because it was in the same

  • linux how to run a background process has nothing to do with the current session 2011-01-05

    Linux put in a jar in the package, run java-classpath: test.jar: Test command to start the java program, but each time turn off the current session window, then the java program to automatically exit, how to ensure that the session is closed java pro

  • Solaris system will approach the process into the background 2010-08-26

    Solaris system will approach the process into the background Problem description: Solaris system in the process of transfer will be running in the background Solution: Transfer process in solaris will run in the background are two cases, one is not a

  • Detailed background to run Unix commands (ZZ) 2010-10-29

    cron system scheduling process. You can use it in the daily operation of non-peak load time job, or in a week or month to run in different time slots. (Very useful for a command, the most powerful.) At at command. Use it in a specific time to run som

  • [Reserved] Linux background process management 2011-01-31

    Original Address: Linux background process management Author: of the fg, bg, jobs, &, ctrl + z command a, & Added to the end of a command, you can put this command into the background, like gftp &, Two, ctrl + z You can execute a command is th

  • nohup command in the background process under Linux (rpm) 2011-03-03

    Unix / Linux under the general want a program running in the background, many of which are used & in the end of the program to let the program run automatically. For example, we want to run mysql in the background: / Usr / local / mysql / bin / mysql