|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
-bash-3.2$ shopt huponexit
huponexit off -bash-3.2$ find ./ -type f > /dev/null & [1] 11612 -bash-3.2$ exit logout Connection closed by foreign host. And after I log back in -bash-3.2$ ps -p 11612 PID TT STAT TIME COMMAND -bash-3.2$ I tried changing find ./ -type f > /dev/null & to nohup find ./ -type f > /dev/null & And still go the same thing. I even tried changing from bash to csh and got the same thing. Ideas? Chad |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 2007-09-09, Chad wrote:
> -bash-3.2$ shopt huponexit > huponexit off > > -bash-3.2$ find ./ -type f > /dev/null & > [1] 11612 > -bash-3.2$ exit > logout > Connection closed by foreign host. > > And after I log back in > > -bash-3.2$ ps -p 11612 > PID TT STAT TIME COMMAND > -bash-3.2$ > > I tried changing > find ./ -type f > /dev/null & > > to > > nohup find ./ -type f > /dev/null & > > And still go the same thing. I even tried changing from bash to csh > and got the same thing. Ideas? The job has finished by the time you log back in? -- Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell/> Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) ===== My code in this post, if any, assumes the POSIX locale ===== and is released under the GNU General Public Licence |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Sep 8, 5:39 pm, "Chris F.A. Johnson" <cfajohn...@gmail.com> wrote:
> On 2007-09-09, Chad wrote: > > -bash-3.2$ shopt huponexit > > huponexit off > > > -bash-3.2$ find ./ -type f > /dev/null & > > [1] 11612 > > -bash-3.2$ exit > > logout > > Connection closed by foreign host. > > > And after I log back in > > > -bash-3.2$ ps -p 11612 > > PID TT STAT TIME COMMAND > > -bash-3.2$ > > > I tried changing > > find ./ -type f > /dev/null & > > > to > > > nohup find ./ -type f > /dev/null & > > > And still go the same thing. I even tried changing from bash to csh > > and got the same thing. Ideas? > > The job has finished by the time you log back in? > > -- > Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell/> > Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) > ===== My code in this post, if any, assumes the POSIX locale > ===== and is released under the GNU General Public Licence I would like to believe that the job is still running after I logged out. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On 2007-09-09, Chad wrote:
> On Sep 8, 5:39 pm, "Chris F.A. Johnson" <cfajohn...@gmail.com> wrote: >> On 2007-09-09, Chad wrote: >> > -bash-3.2$ shopt huponexit >> > huponexit off >> >> > -bash-3.2$ find ./ -type f > /dev/null & >> > [1] 11612 >> > -bash-3.2$ exit >> > logout >> > Connection closed by foreign host. >> >> > And after I log back in >> >> > -bash-3.2$ ps -p 11612 >> > PID TT STAT TIME COMMAND >> > -bash-3.2$ >> >> > I tried changing >> > find ./ -type f > /dev/null & >> >> > to >> >> > nohup find ./ -type f > /dev/null & >> >> > And still go the same thing. I even tried changing from bash to csh >> > and got the same thing. Ideas? >> >> The job has finished by the time you log back in? > > I would like to believe What does that have to do with anything? > that the job is still running after I logged > out. That's more likely to happen if the command is: nohup find / -type f > /dev/null & Or run a script that has an infinite loop. -- Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell/> Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) ===== My code in this post, if any, assumes the POSIX locale ===== and is released under the GNU General Public Licence |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
2007-09-08, 17:31(-07), Chad:
> -bash-3.2$ shopt huponexit > huponexit off > > -bash-3.2$ find ./ -type f > /dev/null & > [1] 11612 > -bash-3.2$ exit > logout > Connection closed by foreign host. > > And after I log back in > > -bash-3.2$ ps -p 11612 > PID TT STAT TIME COMMAND > -bash-3.2$ > > I tried changing > find ./ -type f > /dev/null & > > to > > nohup find ./ -type f > /dev/null & > > And still go the same thing. I even tried changing from bash to csh > and got the same thing. Ideas? [...] If on Linux, try strace -o /tmp/strace.out find ... & instead and look at /tmp/strace.out to check wether find got kill or terminated for another reason (for example because it couldn't write to its stderr). -- Stéphane |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On Sat, 08 Sep 2007 17:31:00 -0700, Chad wrote:
> -bash-3.2$ shopt huponexit > huponexit off > > -bash-3.2$ find ./ -type f > /dev/null & > [1] 11612 > -bash-3.2$ exit > logout > Connection closed by foreign host. > > And after I log back in > > -bash-3.2$ ps -p 11612 > PID TT STAT TIME COMMAND > -bash-3.2$ I have no solution for the above but you might consider using screen. Screen is a terminal multiplexor, think of it like a Window manager for the command line. One of the benefits is that when you get disconnected from a telnet, ssh or rlogin session your process doesn't get disconnected. Screen also buffers the output so you can login later and look at the output (as long as it doesn't over run the screen buffer). I use it at work to run various tests that will take more than a few hours (like 60+ hour tests :-). Screen has many other features but I'll let you discover them on your own. Just doa search on "screen tutorial" or "screen howto". -- Linux Home Automation Neil Cherry ncherry@linuxha.com http://www.linuxha.com/ Main site http://linuxha.blogspot.com/ My HA Blog Author of: Linux Smart Homes For Dummies |
|
![]() |
| Outils de la discussion | |
|
|