Sponsored Content
Top Forums UNIX for Advanced & Expert Users Finding Out When A Process Has Finished? Post 9626 by Perderabo on Wednesday 31st of October 2001 08:34:56 AM
Old 10-31-2001
ps and top require a nontrivial amount of resources to run. And then you still must parse the output. The cheapest way to see if a process is running is via the kill() system call. If you call kill with signal set to zero, error checking is performed but no signal is actually sent.

This works from the shell as well. You can do "kill -0 $pid" and then check the return code. If it worked, the process is still alive.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

finding process id

is there a way to find the process id of a process because i have same process invoked several times. when i need to kill them, i get confused with the id. Thanks, sskb :( (8 Replies)
Discussion started by: sskb
8 Replies

2. UNIX for Dummies Questions & Answers

Finding out process id in a scipt

Hi, If in a shell script i write a command ls > bla & ls The output is redirected to bla and the next ls starts as first one is going on in background. I want to find the PID of the first command. Thanks in advance (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies

3. Shell Programming and Scripting

finding Background Process Id

Hi Gurus, How can i find background process is completed or not. I have mentioned my scenario below. Actually Pr1 Process is running in back ground, i just want to know whether this process completed or not. I can come to know the process id by typing pid=$! but i want to trigger... (4 Replies)
Discussion started by: krk_555
4 Replies

4. Linux

Need help in finding process

Hello, Iam running a apache webserver in CentOS recenlty a hacker has attacked my server using RFI attack and did something in my server.. After that everyday at 8Pm my httpd is using about 5000 pid's actually in normal it takes only about 30 - 40 pid's. and also exim uses 2000 pid's totally my... (2 Replies)
Discussion started by: dheeraj4uuu
2 Replies

5. Shell Programming and Scripting

Finding the process id of the process using the ports

Hi Any idea how to get the process id of the process using the ports lsof -i :portnumber does not work in my machine. I am on sun Solaris SPARC. Any suggestion is highly appreciated (1 Reply)
Discussion started by: kinny
1 Replies

6. UNIX for Advanced & Expert Users

Finding process id of subsequent process

hi all, I am trying to find the process id of the subsequent process created via fork and exec calls in perl. For eg: envVarSetter dataCruncher.exe < input.txt > output.txt When I fork and exec the above command, it returns only the pid of envVarSetter and I don't know how to find the... (9 Replies)
Discussion started by: matrixmadhan
9 Replies

7. UNIX for Dummies Questions & Answers

Finding a rogue process

Afternoon all, hopefully someone can give me a hand with this (the following may be explained very poorly :rolleyes: ) I know there's a process running on one of our Solaris 10 boxes that runs approximately every 5 minutes. Unfortunately I've no idea, who owns it, what it is called, or how it is... (2 Replies)
Discussion started by: dlam
2 Replies

8. Shell Programming and Scripting

Finding process which ended another process

Hello, The scenario is as follows, I have a background process running initially for which i know the PID on machine1. I use ssh from machine 2 to execute a script in machine 1. For some reason the back ground process is terminated. I would like to know which process caused the... (6 Replies)
Discussion started by: prasbala
6 Replies

9. Shell Programming and Scripting

Finding a file process ?

Hi, I am trying to find a file that have a different name than it should be processing, the file name is ( Fifa15 ) is there a command to use? I got that file by ps -ef | grep fifa15 but how do I know what is running ? thanks a lot, I am learning unix so sorry if that is a... (2 Replies)
Discussion started by: latinooo
2 Replies
KDEINIT4(8)							 KDE User's Manual						       KDEINIT4(8)

NAME
kdeinit4 - KDE process launcher. SYNOPSIS
kdeinit4 [--help] [[--no-fork] | [--no-kded] | [--suicide]] [[+programs] | [programs]] DESCRIPTION
kdeinit4 is a process launcher somewhat similar to the famous init used for booting UNIX. It executes KDE programs and kdeinit loadable modules (KLMs) starting them more efficiently. Using kdeinit4 to launch KDE applications makes starting a typical KDE application a couple times faster and reduces memory consumption by a substantial amount. kdeinit4 is linked against all libraries a standard KDE application needs. With this technique, starting an application becomes much faster because now only the application itself needs to be linked whereas otherwise both the application as well as all the libaries it uses need to be linked. DISADVANTAGES
The process name of applications started via kdeinit4 is "kdeinit4". This problem can be corrected to a degree by changing the application name as shown by ps. However, applications like killall will only see kdeinit4 as the process name. To workaround this, use kdekillall (from kdesdk/scripts) for applications started via kdeinit4. OPTIONS
--help Show help about options --no-fork Do not fork, i.e. do not exit until all the executed programs ends --no-kded Do not start kded --suicide Terminate when no KDE applications are left running +programs runs the programs handling requests programs runs the programs without handling requests USAGE
A standard way to run this program is by simply specifying the following command at the prompt kdeinit4 program or kdeinit4 +program FILES
/tmp/kde-$USER/kdeinit4_$INSTANCE ... ENVIRONMENT VARIABLES
$HOME Specifies the home directory of the current user $KDE_HOME_READONLY Specifies if the home directory of the current user is read only $KDE_IS_PRELINKED If set, tells kdeinit4 that the KDE programs are pre-linked. (Prelinking is a process that allows you to speed up the process of dynamic linking.) $KDE_DISPLAY If set, tells kdeinit4 that it is running on a KDE desktop. SEE ALSO
kded, kdekillall BUGS
There are probably tons of bugs. Use bugs.kde.org[1] to report them. AUTHORS
Waldo Bastian <bastian@kde.org> Author. Mario Weilguni <mweilguni@sime.com> Author. Lubos Lunak <l.lunak@kde.org> Author. NOTES
1. bugs.kde.org http://bugs.kde.org 0.01.01 2008-10-03 KDEINIT4(8)
All times are GMT -4. The time now is 03:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy