11-22-2012
Quote:
Originally Posted by
alister
That shell is almost certainly not running in interactive mode. If that's so, then all of its children and its children's children and so forth are running in the same process group. You can consult with ps to verify (your ps output above does not include pgrp info, as far as I can tell).
From within any process in a process group, kill 0 signals all cohorts, whether they be parent, child, grandchild, sibling, cousin, etc.
Regards,
Alister
What do you mean by Interactive ?
I tried with kill -0, but i run this script from the Utility menu of my Fedora 17, i add a .desktop file in /usr/share/applications, and when execute kill -0 just kill all process in the current system session :S
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is there any build in command in unix to kill all the child process for a given process ID ? If any one has script or command, please let me know.
Thanks
Sanjay (4 Replies)
Discussion started by: sanjay92
4 Replies
2. Shell Programming and Scripting
Hello guys,
I have a process named monitoreo, with 'monitoreo start' my process start until i kill them, now i want to do 'monitoreo stop' to kill them.
After 'monitoreo start' i have this process running:
ps -af
UID PID PPID C STIME TTY TIME CMD
ati 10958 1495 ... (5 Replies)
Discussion started by: Lestat
5 Replies
3. Shell Programming and Scripting
hello Bros,
I need to write some script that i can put it on crontab which checks for a process X if running. If the process X is ruuning then take the PID and kill it or display message that says process X is not running.
I am using AIX 5.3
Thanks guys.:b: (2 Replies)
Discussion started by: malcomex999
2 Replies
4. Shell Programming and Scripting
Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it
This is how we execute the script (and this is the requirement) ... (2 Replies)
Discussion started by: jonnyvic
2 Replies
5. Shell Programming and Scripting
Hello all... new to these forums and a bit of a newbie with linux aswell.
I need to figure out how to write a shell script to kill a process by name as given to the script as an argument. I've got that part working OK, but i need to make sure that the script does not allow processes that are... (6 Replies)
Discussion started by: cannon1707
6 Replies
6. UNIX for Dummies Questions & Answers
What I need to learn is how to use a script that launches background processes, and then kills those processes as needed.
The script successfully launches the script. But how do I check to see if the job exists before I kill it?
I know my problem is mostly failure to understand parameter... (4 Replies)
Discussion started by: holocene
4 Replies
7. Shell Programming and Scripting
!/bin/sh
pid=$(ps -Aj | grep MSTRSvr | grep -v grep | awk '{print $1}')
sid=$(ps -Aj | grep MSTRSvr | grep -v grep | awk '{print $3}')
ps -s "$sid"
I am not able to get the desired output it says process list error
if i use watch ps -s "$sid" it considers only the first session id (5 Replies)
Discussion started by: schippada
5 Replies
8. Shell Programming and Scripting
Hi everyone
i am very new to linux , working on bash shell.
I am trying to solve the given problem
1. Create a process and then create children using fork
2. Check the Status of the application for successful running.
3. Kill all the process(threads) except parent and first child... (2 Replies)
Discussion started by: vizz_k
2 Replies
9. Shell Programming and Scripting
Hi all,
I have a query on killing a child process, if it takes more than 10 minutes
myparent.sh has the following
#!/bin/sh
echo "My Parent Script"
home/guru/initiateServer.sh
The initiateServer is a child process and this might take 20 or more minutes to return. I want to kill this... (11 Replies)
Discussion started by: guruincredible
11 Replies
10. Shell Programming and Scripting
HI i would like to know how i can simulate a shell scripts for my requirement.
example
Server name child Process id Parent Process id
Vpesh 16013 15637
Server name child Process id Parent Process id
Vpesh 16014 15637
Server name child... (1 Reply)
Discussion started by: vpesh
1 Replies
LEARN ABOUT HPUX
create_child
create child(1m) create child(1m)
NAME
create child - Creates a child pointer at the master replica of the parent directory
SYNOPSIS
cdscp create child child-name clearinghouse clearinghouse-name
ARGUMENTS
The full name of the child pointer. The full name of a clearinghouse that contains a replica of the child directory.
DESCRIPTION
The create child command creates a child pointer at the master replica of the parent directory. When CDS looks up a name in the namespace,
it uses child pointers to locate directory replicas. Use the set cdscp preferred clearinghouse command before issuing this command to
ensure that the request is directed to the master replica.
Privilege Required
You must have insert permission to the parent directory.
NOTES
Use the create child command only to re-create a child pointer that is accidentally deleted. This command is designed only for trou-
bleshooting.
This command will fail if the associated directory does not exist. If the associated directory exists, this command will return success-
fully.
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE.
EXAMPLE
The following command creates the child pointer in the parent directory /.:/subsys. It uses the replica located at the /.:/subsys/NY_CH
clearinghouse to fill in its replica set.
cdscp> create child /.:/subsys clearinghouse /.:/subsys/NY_CH
RELATED INFORMATION
Commands: delete child(1m), list child(1m), show child(1m)
create child(1m)