Results 1 to 5 of 5
Dear all
in the following pseudo shell script how can I kill run_crafty ?
Code:
for(( i = 0 ; i < 500 ; i++ ))
do
run_crafty
done
Is ...
- 07-30-2009 #1Just Joined!
- Join Date
- Apr 2009
- Posts
- 11
Kill processes called by a shell script
Dear all
in the following pseudo shell script how can I kill run_crafty ?
Is there any other way to call run_crafty in a loop which I can kill the whole loop simpler ?Code:for(( i = 0 ; i < 500 ; i++ )) do run_crafty done
- 07-30-2009 #2Just Joined!
- Join Date
- Apr 2009
- Posts
- 11
also I tried
for(( i = 0 ; i < 500 ; i++ ))
do
killall run_crafty
done
but it didn't work and it only kill one run_crafty process and the second process run when all killall command finish.
- 07-30-2009 #3Just Joined!
- Join Date
- May 2009
- Posts
- 17
A very Crooked method is:
while true
do
killall run_crafty
done
- 07-30-2009 #4Just Joined!
- Join Date
- May 2009
- Posts
- 17
Do let me know whether the above one worked or not????
- 07-30-2009 #5Linux User
- Join Date
- May 2008
- Location
- NYC, moved from KS & MO
- Posts
- 251
Have you tried to terminate the for loop (with Ctrl + C) first, then issue the following command?
I believe you need to stop for loop from forking new processes before you can terminate all the running crafty processes.Code:killall crafty


Reply With Quote