Re: Problems with background jobs with linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> A job started in the background dies when I log out.    

A job started with the & will terminate when the parent process is killed - correct. This is standard for Unix/Linux. You have several ways around this. One is to use the 'nohup' command infront of your command. This little trick program doesn't do much - other than eat the HANGUP signal that is send to a child process when the parent is killed. This means is keeps running.

>I want users 
> to be able to dial into the system, start long jobs (jobs taking 
> several days to complete), and then be able to log out while the job 
> continues to run.

In THAT case you might want to use 'screen' instead. This is one of my top 5 tools on linux. It's easy to use and very powerful. It makes you able to run many many virtual temrinals on one terminal. And even better, they keep running even if you terminate your connection. Do a man screen and be thrilled :)

Other ways of running things in the background is "batch", "at", "crontab". All with different pros and cons. It all depends on what purpose your background process has.

> If a user starts and job in the background and then logs out,  no one 
> else can log into the system on the console until the job is complete.

?? I've never seen that issue.
What kind of job is it?  I run many systems in the background and I might have 10-15 sessions to a box at the same time, without problems.

Regards
  Peter Larsen



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux