10-23-2007
$$ gives you the pid of the current shell that is why it is giving you the pid of the script or session that is calling the nohup statement. you need to place the print $$ within script.ksh and script2.ksh or you will have to get the pid list of the child processes of the current shell. I'll try to paste that part once I figure it out ... but for now see if it is feasible to place those commands within script.ksh and script2.ksh.
hope this helps,
Vj
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I tried searching for this, but I have yet to find anything useful. So here goes,
if a script executed from another script with nohup & hangs, does it affect the parent script? Reason I ask, we have a windows box with NFS, and we use it to store some of our files. Currently, I mount the... (2 Replies)
Discussion started by: Sully
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this.
Thanks in advance,
Amudha (7 Replies)
Discussion started by: samudha
7 Replies
3. UNIX for Advanced & Expert Users
What is the difference between running a process using nohup and running a process in background ? Please explain (6 Replies)
Discussion started by: srksn
6 Replies
4. Shell Programming and Scripting
Hi to everybody.
Is it possible to nohup a process and redirect the output to a file containing the PID?
E.g. if
nohup filename > out.nohup
associate the PID=8074 to filename, is it possible to call the output file something like out_8074.nohup instead of out.nohup? By this way it would... (0 Replies)
Discussion started by: plsrn
0 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have run a shell script as a background process using 'nohup' command. I want to see the process id of this, so that I will be able to kill it later on when required.
I tried to collect these details using 'ps' command and could not view this information.
How do we get this... (5 Replies)
Discussion started by: Dev_Dev
5 Replies
6. Shell Programming and Scripting
Hi,
I am running below code:
for i in `ls`
do
nohup sqlldr userid=apps/apps data=data01.dat log=my1.log control=my.ctl bad=my1.bad direct=yes silent=all parallel=true &
done
This will run the sqlldr command in parallel as a background process.
I want to store the process Id each... (7 Replies)
Discussion started by: Pratiksha Mehra
7 Replies
7. Shell Programming and Scripting
Hello,
I want to save pid of a child process but I get empty file.
su myuser -c "nohup ./mydaemon.sh >/dev/null 2>&1 & print $! > mydaemon.pid"
This one works:
nohup ./mydaemon.sh >/dev/null 2>&1 & print $! > mydaemon.pid
Please help. Thank you in advance. (2 Replies)
Discussion started by: vincegata
2 Replies
8. Shell Programming and Scripting
Hello All,
I need to run a set of scripts, say 50 of them, parallely. I'm running these 50 scripts, from inside a script with the help of 'nohup' command.
1.The fifty scripts are stored in a separate file.
2.In a master script, i'm reading every line of the file through loop and executing... (4 Replies)
Discussion started by: SriRamKrish
4 Replies
9. UNIX for Advanced & Expert Users
Hi All,
I am facing issue in running a process in nohup. I ran a process in terminal since it is taking too long to complete I need to make it as background and nohup. I tried below and was able to make it in back ground
1. Cntrl + Z
2. bg
I am using Korn Shell so disown is not working... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies
10. Shell Programming and Scripting
Hi there!
I have a tricky problem concerning a nohup process:
I started a python2.7 script which loops over a function.
At the end it restarts the function. Due to a mistake I'm now having a never ending nohup process that I have to kill.
I started the program execution with:
>>nohup... (4 Replies)
Discussion started by: Lydia
4 Replies