Sponsored Content
Full Discussion: Orphaned processes
Top Forums UNIX for Dummies Questions & Answers Orphaned processes Post 302558804 by alister on Sunday 25th of September 2011 12:30:02 PM
Old 09-25-2011
If a process has finished but is still hanging around in the process list, it's not an orphan. What you're describing is a zombie. The process is dead but it's still in the process list in case its parent tries to check its exit status.

If the parent exits without ever checking the zombie child's exit status, the zombie child at that point becomes an orphan. However, the orphaned zombie exists only very briefly in this state; the init process adopts it and the zombie disappears.

If instead the child process was still active when the parent exits, it becomes an orphan without ever being a zombie. It is adopted by init and it continues running as if nothing had happened.

So, what are you trying to filter? Zombies or orphans? Also, you should state what operating system you're using, since process list tools tend to be highly unportable.

Regards,
Alister

Last edited by alister; 09-25-2011 at 01:45 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

co-processes

Is it possible to have a main script (i will call it main.ksh) that executes say, 4 other scripts (sub_prog_1.ksh, sub_prog_2.ksh etc..) from within this main.ksh (simultaneously/in parallel), have them run in the background and communicate back to main.ksh when complete? My guess is to use... (1 Reply)
Discussion started by: google
1 Replies

2. UNIX for Dummies Questions & Answers

processes

What command string will locate ONLY the PID of a process and ouput only the number of PID of the process? (1 Reply)
Discussion started by: mma_buc_98
1 Replies

3. Shell Programming and Scripting

processes

does anyone know how to lower the sheduling priority of a process. (3 Replies)
Discussion started by: master_6ez
3 Replies

4. Shell Programming and Scripting

Processes

I have a file like this. No. State Query Times User Processed Syslog 1 ready idle 973s 0 /Application/ugsvols/bldata01/logs/imanscript1562.syslog 2 ready idle 803s 83997 13 /Application/ugsvols/bldata01/logs/imanscript1542.syslog 3 ready idle 2954s 106641... (17 Replies)
Discussion started by: Krrishv
17 Replies

5. UNIX for Advanced & Expert Users

Monitoring Processes - Killing hung processes

Is there a way to monitor certain processes and if they hang too long to kill them, but certain scripts which are expected to take a long time to let them go? Thank you Richard (4 Replies)
Discussion started by: ukndoit
4 Replies

6. Solaris

Remove orphaned packages on Solaris ?

Is there any command that removes orphaned packages in Solaris ? Or a program similar to gtkorphan from Debian ? (7 Replies)
Discussion started by: chinezu'
7 Replies

7. Solaris

Identifying and grouping OS processes and APP processes

Hi Is there an easy way to identify and group currently running processes into OS processes and APP processes. Not all applications are installed as packages. Any free tools or scripts to do this? Many thanks. (2 Replies)
Discussion started by: wilsonee
2 Replies

8. Shell Programming and Scripting

Trap not working in orphaned child processes

I've search the various posts in these forums, but have not come up with a solution to my problem. I have a parent process that calls a child script, runs it in the background and the parent finishes - without waiting for the child process to complete. Inside the child, a trap is issued to trap... (6 Replies)
Discussion started by: HobieCoop
6 Replies

9. Shell Programming and Scripting

Finding the age of a unix process, killing old processes, killing zombie processes

I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time. Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies

10. Red Hat

Orphaned process "D" state

Hello, How can we clear the D state (orphaned) process? I have tried to kill it with kill -9 but not work. The server is critical, so is there anyway to clear the D process without rebooting the server? (9 Replies)
Discussion started by: Phat
9 Replies
EXIT(2) 						      BSD System Calls Manual							   EXIT(2)

NAME
_exit -- terminate the calling process SYNOPSIS
#include <unistd.h> void _exit(int status); DESCRIPTION
The _exit() function terminates a process, with the following consequences: o All of the descriptors that were open in the calling process are closed. This may entail delays; for example, waiting for output to drain. A process in this state may not be killed, as it is already dying. o If the parent process of the calling process has an outstanding wait call or catches the SIGCHLD signal, it is notified of the calling process's termination; the status is set as defined by wait(2). o The parent process-ID of all of the calling process's existing child processes are set to 1; the initialization process (see the DEFINI- TIONS section of intro(2)) inherits each of these processes. o If the termination of the process causes any process group to become orphaned (usually because the parents of all members of the group have now exited; see ``orphaned process group'' in intro(2)), and if any member of the orphaned group is stopped, the SIGHUP signal and the SIGCONT signal are sent to all members of the newly-orphaned process group. o If the process is a controlling process (see intro(2)), the SIGHUP signal is sent to the foreground process group of the controlling ter- minal. All current access to the controlling terminal is revoked. Most C programs call the library routine exit(3), which flushes buffers, closes streams, unlinks temporary files, etc., before calling _exit(). RETURN VALUE
_exit() can never return. SEE ALSO
fork(2), sigaction(2), wait(2), exit(3) STANDARDS
The _exit function is defined by IEEE Std 1003.1-1988 (``POSIX.1''). 4th Berkeley Distribution June 4, 1993 4th Berkeley Distribution
All times are GMT -4. The time now is 09:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy