Operating System - HP-UX
1820479 Members
2627 Online
109624 Solutions
New Discussion юеВ

nohup - is it working or not???

 
SOLVED
Go to solution
Peter Gillis
Super Advisor

nohup - is it working or not???

HI,
ux-op 11.00; rp2470 machine.
Is there a way to tell if the nnohup command is working properly or not. Are there stty setting s or such that need to be in place?
I have issued a nohup cmd and immediatley it appears the job is being stopped. would someone explain it and how I can stop this from happening. a copy of the command and output follows:
# ps -ef|grep dsm

root 8814 8793 0 08:26:40 pts/tb 0:00 grep dsm (check job not running)
#nohup dsmc schedule >> /dev/null &
[1] 9817 (start the job)

# ps -ef |grep dsm
root 9821 8793 0 09:49:58 pts/tb 0:00 grep dsm
root 9817 8793 0 09:49:51 pts/tb 0:00 dsmc schedule
[1] + Stopped (SIGTTIN) nohup dsmc schedule >> /dev/null &

thanks,
Maria.
4 REPLIES 4
John Poff
Honored Contributor
Solution

Re: nohup - is it working or not???

Hi Maria,

Your nohup is working just fine. The problem is that your process is expecting to read something from standard input and it no longer controls the terminal, which is what generates the SIGTTIN signal. My guess is that your dsmc program is prompting for some kind of input and is causing a problem when it tries to run in background. Your process either needs to run without looking for input, or else you'll need to figure out what it needs and pass it the input somehow.

JP
Michael Tully
Honored Contributor

Re: nohup - is it working or not???

Hi Maria,

Try running the script like this. Is there some sort of input that the command/script is requesting?

$ nohup script /dev/null 2>&1 &

Regards
Michael

Anyone for a Mutiny ?
Mel Burslan
Honored Contributor

Re: nohup - is it working or not???

If the input is something simple like selecting a menu item, such as 1 or 2 or etc., make your command line something like :

#nohup dsmc schedule >> /dev/null < /tmp/inputfile &

and create your /tmp/inputfile with the number or letter by itself on the first line of this file followed by a carriage return.

Hope this helps.
________________________________
UNIX because I majored in cryptology...
Peter Gillis
Super Advisor

Re: nohup - is it working or not???

Thanks. I have found that the job is waiting for some input as you all stated.... Now I'll go blast that one, and get the actual job running. Thanks again.
Maria