Otherwise, what exactly is your program trying to do? What is
the minimal source code that fails? Can you 'nohup' a program
like " main(){ while(1); } " properly?
> I am running a program with
> nohup myprogram
> but when I close terminal, program dead.... any idea.... why?
> thx.
> -----------------------------------------------------------
> Fermin Serrano Pozo
> Madrid (Spain)
> -----------------------------------------------------------
If you can rewrite the program, you can make it run as a quasi-deamon and
thereby assure that its parent pid is 1 rather than the pid of your shell.
1. Write a script myscript that contains the setpgrp command:
setpgrp mycommands
2. call nohup:
nohup myscript &
3. Exit the shell:
exit
This seems to work for me. I haven't been able to get it to work another
way.
Hope this helps.
Pieter
I have other server that when I close terminal, it still running (I run it
with nohup)
> Otherwise, what exactly is your program trying to do? What is
> the minimal source code that fails? Can you 'nohup' a program
> like " main(){ while(1); } " properly?
1. Problem with nohup myfile &
Platform ksh on Solaris ...
I have a script with the following
<do some other stuff, then>
cp JCpy_skeleton.properties JCpy_run2.properties
ed - JCpy_run2.properties <<EOM
g/xxx/s/xxx/$SRCDB/g
g/yyy/s/yyy/$TGTDB/g
w
q
EOM
nohup run_eds_batch.sh $SRCDB $TGTDB &
exit
My problem is that I have to hit 'enter' to get a system prompt back
after the nohup. Running it with a 'set -x' produces the following:
======== begin screen log =======
+ cp JCpy_skeleton.properties JCpy_run2.properties
+ ed - JCpy_run2.properties
+ 0<<
g/xxx/s/xxx/CMPM1240/g
g/yyy/s/yyy/CMQM1240/g
w
q
+ exit
+ nohup run_eds_batch.sh CMPM1240 CMQM1240
$ Sending output to nohup.out
$
======== end screen log =======
That blank line between "Sending output to nohup.out" and the next
command prompt is where it was waiting for me to hit 'enter'. I
thought the '&' at the end of the nohup command prevented that.
Thanks.
- Ed Stevens
Cohn's Law: The more time you spend in reporting on what you are doing, the less time you have to do anything. Stability is achieved when you spend all your time doing nothing but reporting on the nothing you are doing.
2. Problem with Printer Interface on Sco Unix 3.2
3. Problem with nohup jobs dying
6. gnus problem
7. Problem with nohup under AIX 5L
8. mouse problem with red hat 7.1
9. Problems using nohup command
10. Problem with Nohup and no control terminal
11. Problem with nohup in z-shell (zsh)
12. Problems with nohup and remsh
13. Problem w/nohup and mksysb