Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Kill child processes, when parent is "bash" Post 302376889 by teras on Wednesday 2nd of December 2009 02:46:47 PM
Old 12-02-2009
I know that I can programmatically parse the whole tree and recursively kill all children.
But it seems to me that this is has a big overhead.

Isn't there any other way to do it?
I thought this was the default behaviour, the childer to be killed when the parent gets killed.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

kill parent and child

Hello all, I have gone through the search and looked at posting about idle users and killing processes. Here is my question I would like to kill an idle user ( which I can do) but how can I asure that all of his process is also killed whit out tracing his inital start PID. I have tried this on a... (4 Replies)
Discussion started by: larry
4 Replies

2. UNIX for Advanced & Expert Users

"kill -14 pid" doesn't works on all processes !!

If I try to run "kill -14 pid", some processes in my application get terminated , while some keeps running. If SIGALRM signal is sent, they should make an exit. What's the reason any process keeps on running. (1 Reply)
Discussion started by: poojac
1 Replies

3. Programming

"No child processes" and waitpif

Hi everybody, i'm using a signal handler for the SIGCHLD signal. void InstallNewSigChldHandler() { struct sigaction act; struct sigaction oldAct; act.sa_handler = CallWaitChildProcess; sigemptyset(&act.sa_mask); act.sa_flags = SA_NOCLDSTOP; if... (5 Replies)
Discussion started by: Zipi
5 Replies

4. AIX

Typing "bash" at the command line spawns two bash processes

Server: IBM p770 OS: AIX 6.1 TL5 SP1 When one of our develoeprs types "bash" on the command line to switch shells, it hangs. For some reason, two bash processes are created....the first bash process spawns a second bash process in the same console, causing a hang. Anyone have any idea what... (2 Replies)
Discussion started by: wjssj
2 Replies

5. Shell Programming and Scripting

will child processes be created when executing "ps"?

Hi I'm trying to write some code to confirm there is only one running instance in memory like below: /usr/ucb/ps -auxww | egrep -v 'grep |vi |tail |more |cat ' | egrep ${SCRIPT_NAME} | egrep -v " \-h| \-help| \-v" But sometimes i found there is some child processes are are created as... (4 Replies)
Discussion started by: sleepy_11
4 Replies

6. Shell Programming and Scripting

need to kill a number of processes with name "XYZ" at a time using shell script

Hi, when i grep for the process "XYZ" , there will be some good number of processes with that name, i want to kill all the these processes at a time using shell script? Any help needed for this action. Thanks Regards, Anil (6 Replies)
Discussion started by: anilmanepu
6 Replies

7. Shell Programming and Scripting

forking a child process and kill its parent to show that child process has init() as its parent

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

8. Shell Programming and Scripting

Kill Parent/ Child processes

I am trying to kill PIDs that are tied to a KSH "load_sqlplus" and I am using the below code LIST_PID=`ps -ef | grep -i "load_sqlplus" | grep -v grep | awk '{print $2}'` if ; then echo "Processes killed" "PID : " $LIST_PID kill -9 $LIST_PID else echo "Nothing to Kill" fi... (4 Replies)
Discussion started by: venky338
4 Replies

9. Shell Programming and Scripting

What is the use of "finger" command & how to use it to kill the online processes ?

Hi there, I am eager to know what exactly is the use of "finger" command & how to use it to kill the online processes ? :b: (1 Reply)
Discussion started by: abhijitpaul0212
1 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
XKILL(1)						      General Commands Manual							  XKILL(1)

NAME
xkill - kill a client by its X resource SYNOPSIS
xkill [-display displayname] [-id resource] [-button number] [-frame] [-all] DESCRIPTION
Xkill is a utility for forcing the X server to close connections to clients. This program is very dangerous, but is useful for aborting programs that have displayed undesired windows on a user's screen. If no resource identifier is given with -id, xkill will display a spe- cial cursor as a prompt for the user to select a window to be killed. If a pointer button is pressed over a non-root window, the server will close its connection to the client that created the window. OPTIONS
-display displayname This option specifies the name of the X server to contact. -id resource This option specifies the X identifier for the resource whose creator is to be aborted. If no resource is specified, xkill will display a special cursor with which you should select a window to be kill. -button number This option specifies the number of pointer button that should be used in selecting a window to kill. If the word "any" is speci- fied, any button on the pointer may be used. By default, the first button in the pointer map (which is usually the leftmost but- ton) is used. -all This option indicates that all clients with top-level windows on the screen should be killed. Xkill will ask you to select the root window with each of the currently defined buttons to give you several chances to abort. Use of this option is highly discour- aged. -frame This option indicates that xkill should ignore the standard conventions for finding top-level client windows (which are typically nested inside a window manager window), and simply believe that you want to kill direct children of the root. XDEFAULTS
Button Specifies a specific pointer button number or the word "any" to use when selecting windows. SEE ALSO
X(7x), xwininfo(1), XKillClient and XGetPointerMapping in the Xlib Programmers Manual, KillClient in the X Protocol Specification AUTHOR
Jim Fulton, MIT X Consortium Dana Chee, Bellcore X Version 11 Release 6.6 XKILL(1)
All times are GMT -4. The time now is 09:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy