why nohup not work

why nohup not work

Post by davi » Sat, 05 Jul 2003 01:32:52



I want to run matlab as a background process on a sgi matchine so that after
I close my terminal the program can still run on the machine.

I have tried to connect the machine using both x-win32 software and telnet
under windows 2000. The shell that I have tried including tcsh and sh, ksh.

The command that I use is like this

nohup matlab <x.m> & x.out &

If the terminal is not closed, the program is runing well. But once the
terminal is closed, the program stop to run, and the process ended.

I also tried to run several other program such as "nohup pico &", but still
the same problem.

Can anyone give me some suggestions regarding this problem?

Thanks

David

 
 
 

why nohup not work

Post by those who know me have no need of my nam » Sun, 06 Jul 2003 06:11:25


in comp.unix.questions i read:

Quote:>I want to run matlab as a background process on a sgi matchine so that after
>I close my terminal the program can still run on the machine.
>Can anyone give me some suggestions regarding this problem?

yes.  interactive programs hate it when the terminal disappears.  use a
program that runs the program using a pseudo-terminal, from which you can
disconnect, e.g., the dislocate program supplied as an expect example or
gnu screen.

--
a signature

 
 
 

1. nohup xterm doesn't nohup -- why?

Since this may be a shell type question, or it may be an X question, I've
cross-posted to comp.unix.shell, and comp.windows.x.

In Korn shell, "nohup command &" is required to run a command in the background
while permitting ^D to log out of the controlling tty that launched the command.
The first ^D says something like "There are running jobs". The second ^D goes
ahead and logs out, and the nohup'ed command keeps on running.

Without nohup, the process running the command gets killed upon the second ^D.

None of that is news to anyone here, I suspect.

However, if the command is xterm, then my nohup'ed xterm window dies too upon
the second ^D. True in Korn shell, but in bash, the xterm window stays. In fact,
in bash, an xterm window stays even without the nohup.

I *thought* I had once fixed this problem by writing a small script called
xnohup that begins with

#!/bin/ksh
trap '' HUP

And then proceeds to run the command in $1. Although I am almost positive that
this once worked while the system nohup didn't, now neither my xnohup nor the
system nohup work. Work in the sense that I can log out of the controlling tty
without losing the xterm window.

Any idea why? And how to fix it?

What I really want is to rsh to a host and run xterm there with display back
to some X server. THen kill the controlling tty. Why? Because the controlling
tty is often a telnet from an X terminal, which counts against the log in
limit on my machine, while rsh xterm doesn't count against that limit.

System is IBM RS/6000, AIX 3.2.3, X11R5.

Email replies preferred.

Thanks,
Johnny Tolliver
Oak Ridge National Laboratory

2. kernel driver initialization calls during boot?

3. When is NOHUP not NOHUP?

4. ViewTop AGP Mars2

5. to nohup or not to nohup - that is the question

6. Is it possible to UUTO or UUCP to different servers on the internet?

7. nohup not generating/updating nohup.out from cron

8. Setup X-Terminal on Windows System

9. nohup does not work with 'make' on SuSE 7.1

10. nohup not working properly on SCO R5??

11. nohup not working

12. NOHUP command not working

13. nohup not working correctly