kill scripts which are started using nohup


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users kill scripts which are started using nohup
# 1  
Old 07-19-2006
Error kill scripts which are started using nohup

i have scipt which is calling some
other scripts and some built-in utilities like SED, find etc..

i started this script using nohup
(e.g: nohup scriptname &)

now i want to kill this script and all the child processes
of this script.

the problem is, process id of child processes are changing rapidly,
one dies, another created and so on.
thats why i cannot kill them

what can i do?

used killall, but i didnt work?

do you have any idea?
# 2  
Old 07-19-2006
Why killall does not work?
try
$ killall -KILL scriptname
# 3  
Old 07-19-2006
what happens if you just kill the parent script?
# 4  
Old 07-20-2006
When you invoke process with nohup and kill nohup, then init process (pid=1) becomes the parent of the scriptname
# 5  
Old 07-20-2006
it becomes the parent of the script, but not the parent script. Nohup simply prevents the processess from receiveing SIGHUP. It should still respond as expected to SIGTERM ot SIGKILL.

Last edited by reborg; 07-20-2006 at 07:27 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh behavior in scripts spawned w/nohup

I have a need to run any number of identical scripts simultaneously, so I've created a driver script which reads a template script, edits these appropriately and then submits them via nohup. The spawned scripts all check to see at some point how many of their number are running and once the count... (7 Replies)
Discussion started by: safedba
7 Replies

2. Shell Programming and Scripting

Kill nohup process with changing PID

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

3. Shell Programming and Scripting

How to get cron (scripts in crontab) started?

Hi, I have a query related to UNIX Crontab scripts - Issue: Server space on the db server got 100% full as a result of which the cron scripts did not run. The space utilization issue got resolved in the afternoon. The crons scheduled for a time post the resolution caught up. However the... (1 Reply)
Discussion started by: qwerty000
1 Replies

4. Shell Programming and Scripting

I need to save a pid of a child started with $: su <user> -c “nohup …”

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

5. Shell Programming and Scripting

Saving nohup output to a file other than nohup.out

Shell : bash OS : Oracle Linux 6.4 I want to save the ouput of a nohup command to file other than nohup.out . Below are my 3 attempts. For both Attempt1 and Attempt2 , the redirection logs the output correctly to the output file. But I get the error "ignoring input and redirecting stderr to... (7 Replies)
Discussion started by: kraljic
7 Replies

6. Shell Programming and Scripting

Just started using UNIX, im at the basics and my scripts broken.

echo "Hi $username, guess what my favourite colour is!" count=0 while ] do read colour if then $count=1 echo "See ya later!" elif then $count=1 echo "You guessed correctly! Great job!"... (6 Replies)
Discussion started by: solomonsnare
6 Replies

7. UNIX for Dummies Questions & Answers

Startup/Kill Scripts

Hello, I have to perform an audit of a system at work and I am looking at its /etc/rc3.d: K01tog-pegasus K74nscd S08iptables S50openemm K01yum K74ntpd S09isdn S55cups K02NetworkManager K85mdmpd S09pcmcia S55sshd K03rhnsd ... (8 Replies)
Discussion started by: mojoman
8 Replies

8. Shell Programming and Scripting

Process id of the exe started with nohup

Hi, I have a strange problem. In my shell script, i am startting another program (a c++ exe) with nohup . I am getting the process id of this started process with using $! I am writing this process id into another file so that i can keep checking for this process ids to check whether the... (2 Replies)
Discussion started by: parvathi_rd
2 Replies

9. UNIX for Advanced & Expert Users

rc scripts, do i need to kill them on shutdown?

We have a bunch of tools, that run on linux and on unix, I've got start up scripts that bring up their license managers when the unix box boots, do I need kill scripts for when the box is shutting down? I've not seen much documentation on this, just on getting the license managers started, but... (1 Reply)
Discussion started by: kymberm
1 Replies

10. UNIX for Dummies Questions & Answers

kill scripts under Solaris

I should know this, but do K scripts in the /etc/rc?.d directories get run in numerically ascending or descending order? By default there are none in rc3.d. Is it OK to put 2 in there, and will they be run first (which is my goal). Thanks, Chuck (1 Reply)
Discussion started by: 98_1LE
1 Replies
Login or Register to Ask a Question