Sponsored Content
Top Forums Shell Programming and Scripting When kill [pid] does not work... Post 302231437 by matrixmadhan on Tuesday 2nd of September 2008 09:56:02 AM
Old 09-02-2008
only process can be killed.
zombie is not at all a process.
It just represents its existence in the past occupying a slot in the kernel process table and as such it is not a process
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

pass pid to kill using script

Hi there, i wonder if anyone can help is there any way that i can write a script that will kill all current ftp processes, for example if ps -ef | grep ftp produces 3 active proceses, then I would like to somehow extract the PID for each one and pass that to kill -9 has anybody done this... (2 Replies)
Discussion started by: hcclnoodles
2 Replies

2. UNIX for Advanced & Expert Users

When kill doesnt work, how to kill a process ?

Hi All, I am unable to kill a process using kill command. I am using HP-UX system. I have tried with kill -9 and i have root privilages. How can i terminate this daemon ? ? ? Regards, Vijay Hegde (3 Replies)
Discussion started by: VijayHegde
3 Replies

3. Shell Programming and Scripting

KILL PID, intern should kill another PID.

Hi All, In my project i have two process runs in the back end. Once i start my project, and execute the command ps, i get below output: PID TTY TIME CMD 9086 pts/1 0:00 ksh 9241 pts/1 0:02 java 9240 pts/1 0:00 shell_script_bg java with 9241 PID is the main... (4 Replies)
Discussion started by: rkrgarlapati
4 Replies

4. UNIX for Advanced & Expert Users

KILL without PID

Hellow Experts i have one problem. i run one script in backgroun. and i want to kill that script with only script name..... so what's the solution.. for your info my script name is "testscript" n it contains "sleep 100" thanks.... (16 Replies)
Discussion started by: luckypower
16 Replies

5. AIX

kill -3 <PID> ... where the output file goes?

Hi all, I am generating the coredump of my JBoss, and by default it puts it in to a particular directory. i.e. JBOSS_HOME/. I would like this output file to be created, lets say in /tmp/dump/. I tried the following: kill -3 9404940>/tmp/dump/out.txt But it created... (3 Replies)
Discussion started by: haroon_a
3 Replies

6. UNIX for Dummies Questions & Answers

How to Kill process with dynamic PID?

Hello, I have problem with killing red5 process running on linux server. As this process is continuously changing its PID so it can't be killed with "kill -9 PID" command. First I used following command to list RED5 process ps aux | grep red5 which showed me root 5832 0.0 0.0 4820 756pts/0... (1 Reply)
Discussion started by: ninadgac
1 Replies

7. Shell Programming and Scripting

How to Kill process with dynamic PID?

Hello, I have problem with killing red5 process running on linux server. As this process is continuously changing its PID so it can't be killed with "kill -9 PID" command. First I used following command to list RED5 process ps aux | grep red5 which showed me root 5832 0.0 0.0 4820 756pts/0... (4 Replies)
Discussion started by: ninadgac
4 Replies

8. Shell Programming and Scripting

Kill a PID using script

Hi, I wrote a script to kill a process id. I am able to kill the PID only if I enter the root password in the middle of the execution because I did not run as root i.e after i run the script from the terminal, instead of killing directly, it is killing only after entering the pass when it... (12 Replies)
Discussion started by: rajkumarme_1
12 Replies

9. Shell Programming and Scripting

Kill PID with one liner

Hello Friends, I've been trying to write a one line which checks java processes and filter them for a user (testuser) and then check process arguments with PARGS command and then check if there is certain patterns exists in pargs output then kill the process. I have tried the following so... (2 Replies)
Discussion started by: EAGL€
2 Replies

10. AIX

Kill pid

I created a program to kill long running pid processes. I am getting the following error message: -f command cannot be found. I also want to count the number of pids that are killed and append the results to a text file. I am new to shell script programming. 1.The first part of code... (10 Replies)
Discussion started by: dellanicholson
10 Replies
exit(2) 							   System Calls 							   exit(2)

NAME
exit, _Exit, _exit - terminate process SYNOPSIS
#include <stdlib.h> void exit(int status); void _Exit(int status); #include <unistd.h> void _exit(int status); DESCRIPTION
The exit() function first calls all functions registered by atexit(3C), in the reverse order of their registration, except that a function is called after any previously registered functions that had already been called at the time it was registered. Each function is called as many times as it was registered. If, during the call to any such function, a call to the longjmp(3C) function is made that would terminate the call to the registered function, the behavior is undefined. If a function registered by a call to atexit(3C) fails to return, the remaining registered functions are not called and the rest of the exit() processing is not completed. If exit() is called more than once, the effects are undefined. The exit() function then flushes all open streams with unwritten buffered data, closes all open streams, and removes all files created by tmpfile(3C). The _Exit() and _exit() functions are functionally equivalent. They do not call functions registered with atexit(), do not call any regis- tered signal handlers, and do not flush open streams. The _exit(), _Exit(), and exit() functions terminate the calling process with the following consequences: o All of the file descriptors, directory streams, conversion descriptors and message catalogue descriptors open in the calling process are closed. o If the parent process of the calling process is executing a wait(3C), wait3(3C), waitid(2), or waitpid(3C), and has neither set its SA_NOCLDWAIT flag nor set SIGCHLD to SIG_IGN, it is notified of the calling process's termination and the low-order eight bits (that is, bits 0377) of status are made available to it. If the parent is not waiting, the child's status will be made available to it when the parent subsequently executes wait(), wait3(), waitid(), or waitpid(). o If the parent process of the calling process is not executing a wait(), wait3(), waitid(), or waitpid(), and has not set its SA_NOCLDWAIT flag, or set SIGCHLD to SIG_IGN, the calling process is transformed into a zombie process. A zombie process is an inactive process and it will be deleted at some later time when its parent process executes wait(), wait3(), waitid(), or wait- pid(). A zombie process only occupies a slot in the process table; it has no other space allocated either in user or kernel space. The process table slot that it occupies is partially overlaid with time accounting information (see <sys/proc.h>) to be used by the times(2) function. o Termination of a process does not directly terminate its children. The sending of a SIGHUP signal as described below indirectly terminates children in some circumstances. o A SIGCHLD will be sent to the parent process. o The parent process ID of all of the calling process's existing child processes and zombie processes is set to 1. That is, these processes are inherited by the initialization process (see Intro(2)). o Each mapped memory object is unmapped. o Each attached shared-memory segment is detached and the value of shm_nattch (see shmget(2)) in the data structure associated with its shared memory ID is decremented by 1. o For each semaphore for which the calling process has set a semadj value (see semop(2)), that value is added to the semval of the specified semaphore. o If the process is a controlling process, the SIGHUP signal will be sent to each process in the foreground process group of the controlling terminal belonging to the calling process. o If the process is a controlling process, the controlling terminal associated with the session is disassociated from the session, allowing it to be acquired by a new controlling process. o If the exit of the process causes a process group to become orphaned, and if any member of the newly-orphaned process group is stopped, then a SIGHUP signal followed by a SIGCONT signal will be sent to each process in the newly-orphaned process group. o If the parent process has set its SA_NOCLDWAIT flag, or set SIGCHLD to SIG_IGN, the status will be discarded, and the lifetime of the calling process will end immediately. o If the process has process, text or data locks, an UNLOCK is performed (see plock(3C) and memcntl(2)). o All open named semaphores in the process are closed as if by appropriate calls to sem_close(3C). All open message queues in the process are closed as if by appropriate calls to mq_close(3C). Any outstanding asynchronous I/O operations may be cancelled. o An accounting record is written on the accounting file if the system's accounting routine is enabled (see acct(2)). o An extended accounting record is written to the extended process accounting file if the system's extended process accounting facility is enabled (see acctadm(1M)). o If the current process is the last process within its task and if the system's extended task accounting facility is enabled (see acctadm(1M)), an extended accounting record is written to the extended task accounting file. RETURN VALUES
These functions do not return. ERRORS
No errors are defined. USAGE
Normally applications should use exit() rather than _exit(). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |See below. | +-----------------------------+-----------------------------+ |Standard |See standards(5). | +-----------------------------+-----------------------------+ The _exit() and _Exit() functions are Async-Signal-Safe. SEE ALSO
acctadm(1M), Intro(2), acct(2), close(2), memcntl(2), semop(2), shmget(2), sigaction(2), times(2), waitid(2), atexit(3C), fclose(3C), mq_close(3C), plock(3C), signal.h(3HEAD), tmpfile(3C), wait(3C), wait3(3C), waitpid(3C), attributes(5), standards(5) SunOS 5.11 5 Feb 2008 exit(2)
All times are GMT -4. The time now is 04:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy