Sponsored Content
Top Forums Shell Programming and Scripting When kill [pid] does not work... Post 302231779 by sysgate on Wednesday 3rd of September 2008 06:16:21 AM
Old 09-03-2008
Um, yeah. I've seen it in commercial, proprietary application. Developers have chosen to put <defunct> tag in the process' name not when the process becomes zombie, as this is the only parent, but when it was trying to acquire certain number of open files, which may be impossible at this time, due to ulimit limitation for example. On the same application, <defunct> has been chosen as generic error message, just as in perl's warn : "Warning: Something's wrong" when $@ is empty.
 

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
fork(2) 							System Calls Manual							   fork(2)

NAME
fork, vfork - Creates a new process SYNOPSIS
#include <unistd.h> pid_t fork (void); pid_t vfork (void); Application developers may want to specify an #include statement for <sys/types.h> before the one for <unistd.h> if programs are being developed for multiple platforms. The additional #include statement is not required on Tru64 UNIX systems or by ISO or X/Open standards, but may be required on other vendors' systems that conform to these standards. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: fork(): XSH5.0 vfork(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The fork() and vfork() functions create a new process (child process) that is identical to the calling process (parent process). The child process inherits the following attributes from the parent process: Environment Close-on-exec flags Signal handling settings Set user ID mode bit Set group ID mode bit Trusted state Profiling on/off status Nice value All attached shared libraries Process group ID tty group ID Current directory Root directory File mode creation mask File size limit Attached shared memory segments Attached mapped file seg- ments All mapped regions with the same protection and sharing mode as in the parent process Its own copy of the parent's open directory streams The child process differs from the parent process in the following ways: The child process has a unique process ID that does not match any active process group ID. The parent process ID of the child process matches the process ID of the parent. The child process has its own copy of the parent process's file descriptors. Each of the child's file descriptors refers to the same open file description with the cor- responding file descriptor of the parent process. The child process has its own copy of the parent's open directory streams. Each open directory stream in the child process may share directory stream positioning with the corresponding directory stream of the parent. All semadj values are cleared. Process locks, text locks, and data locks are not inherited by the child process. The child process' values of tms_utime, tms_stime, tms_cutime, and tms_cstime are set to 0 (zero). Any pending alarms are cleared in the child process. [Tru64 UNIX] Any interval timers enabled by the parent process are reset in the child process. Any signals pending for the parent process are cleared for the child process. NOTES
If a multithreaded process forks a child process, the new process contains a replica of the calling thread and its entire address space, possibly including the states of mutexes and other resources. Consequently, to avoid errors, the child process should only execute opera- tions it knows will not cause deadlock. The fork() and vfork() functions have essentially the same implementation at the level of the operating system kernel but may differ in how they are supported through different libraries. Some libraries, such as libpthread and libc, support fork handler routines that can acquire and release resources that are critical to the child process. Fork handlers therefore allow an application to manage potential deadlock situations that might occur between the parent and child processes. Fork handlers do not work correctly if the application calls vfork() to create the child process. Therefore, applications using libpthread and libc should call fork() to create a child process. For more information about fork handler routines, see pthread_atfork(3). For a complete list of system calls that are reentrant with respect to signals, see signal(4). RETURN VALUES
Upon successful completion, the fork() and vfork() functions return a value of 0 (zero) to the child process and return the process ID of the child process to the parent process. Otherwise, a value of -1 is returned to the parent, no child process is created, and errno is set to indicate the error. ERRORS
The fork() and vfork() functions set errno to the specified values for the following conditions: The limit on the total number of processes executing for a single user would be exceeded. This limit can be exceeded by a process with superuser privilege. There is not enough space left for this process. RELATED INFORMATION
Functions: exec(2), exit(2), getpriority(2), getrusage(2), plock(2), ptrace(2), semop(2), shmat(2), sigaction(2), sigvec(2), umask(2), wait(2) Routines: nice(3), pthread_atfork(3), raise(3), times(3), ulimit(3) Files: signal(4) Standards: standards(5) delim off fork(2)
All times are GMT -4. The time now is 08:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy