Running at command - Parent script getting killed


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Running at command - Parent script getting killed
# 1  
Old 02-23-2010
Running at command - Parent script getting killed

I have a script that calls another script within it that takes about 1 hour to execute. I am noticing that the parent script that calls the child script is getting killed. Does anyone know why? The child script still runs.
# 2  
Old 02-23-2010
Looks like you are "exec"ing the child script, which replaces the parent shell.
# 3  
Old 02-23-2010
Have you wait for the child process?
# 4  
Old 02-23-2010
This only happens when I run the job as a scheduled job. If I run the parent script by itself without scheduling it, the script works fine.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to exit from the parent script while the child is running?

hi, i want to call a child shell script from a parent shell script. the child will be running for 5 mins. normally when the child is running, parent will wait till the child completes. so in the above case parent will be paused for 5 mins. is there a way so that the parents does not wait for the... (3 Replies)
Discussion started by: Little
3 Replies

2. Shell Programming and Scripting

Could not get script name running from ps -ef command ?

hi.. i have one perl script called sendsms.pl. After i execute the perl script as background process and run ps -ef, it did not display the filename. It was display as "/usr/bin/perl". How could execute the perl program and display the filename using ps command ? #./sendsms & #ps -ef |grep... (3 Replies)
Discussion started by: bh_hensem
3 Replies

3. Shell Programming and Scripting

command to use if someone killed the script in between?

Hi All, I want to know about what command i can use so that it should run the below mentioned line if somebody killed the process when i run my script... the command to run once my script is killed is \rm -rf $LOCKDIR Thank you (2 Replies)
Discussion started by: smarty86
2 Replies

4. Shell Programming and Scripting

How to export a variable from a child process running in background to the parent

Hi All, I have a script which calls a child script with a parameter to be run in the background . childscript.ksh $a & Can any one suggest me how do i export a variable from the child script to parent script? Note that the child script is in background If the child script is in... (3 Replies)
Discussion started by: aixjadoo
3 Replies

5. Shell Programming and Scripting

multiple child scripts running in backgroud, how to use grep on the parent?

Hi I have a shell script A which calls another 10 shell scripts which run in background. How do i make the parent script wait for the child scripts complete, or in other words, i must be able to do a grep of parent script to find out if the child scripts are still running. My Code: ... (5 Replies)
Discussion started by: albertashish
5 Replies

6. UNIX for Advanced & Expert Users

how to make a parent wait on a child shells running in background?

Hi I have a shell script A which calls another 10 shell scripts which run in background. How do i make the parent script wait for the child scripts complete, or in other words, i must be able to do a grep of parent script to find out if the child scripts are still running. My Code: ... (1 Reply)
Discussion started by: albertashish
1 Replies

7. Shell Programming and Scripting

full path of a file situated either in parent's dir. or parent's parent dir. so on...

hi experts(novice people can stay away as it is no child's game), i am developing a script which works like recycle bin of windows. the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to... (1 Reply)
Discussion started by: yahoo!
1 Replies

8. UNIX for Dummies Questions & Answers

Who is the parent of a killed process ?

Suppose we have the following process tree: init-> ProcessA->processB->processC then I kill processB Who is the parent of the processC? init or the processA (6 Replies)
Discussion started by: Puntino
6 Replies

9. Programming

Status of child job after parent is killed

Hi, I have a requirement. Scenario: A parent job invokes a child job and gets killed. The child becomes orphan and gets attached to init. Child job is removed from the pid table as soon as it gets completed. Requirement is i need the status of the child job even after the parent job is... (7 Replies)
Discussion started by: anjul_thegreat
7 Replies
Login or Register to Ask a Question