Re: [LIP] check instance of a running application

ram <rammohhan2000-/[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
Shared Memory between instances.good Idea.Let me try
that.

Apart from writing to a File for instance checking, 

what does the command does.. 
killall -9 myapplication  

If i want to implement this way thr code what should i
do to kill the application  by just passing the
application name without using exec or system
command.Just want to know the other approach.

ram
--- Shridhar Daithankar
<[email protected]> wrote:
> Binand Sethumadhavan wrote:
> > On Wed, Dec 24, 2003 at 04:45:43AM -0800, Ram
> wrote:
> > 
> >>For checking whether app is still running , I
> tried by
> >> writing the  PID value to a file and later
> checked
> >>whether it exists or not. is there any other way
> to do
> >>this....
> > 
> > 
> > Your method is fine. On startup, log the PID in a
> file somewhere. To
> > check if the application is running or not, use
> kill().
> 
> Rather than writing pid file, you can attach to a
> shared memory segment and 
> write ID of that segment to file. That way the
> information can be passed between 
> instances even if one instance died much before
> start of next instance..
> 
>   Just another approach..
> 
>   Shridhar
> 
> 
>
-------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux
> Tutorials.
> Become an expert in LINUX or just sharpen your
> skills.  Sign up for IBM's
> Free Linux Tutorials.  Learn everything from the
> bash shell to sys admin.
> Click now!
>
http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> linux-india-programmers mailing list
> linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>
https://lists.sourceforge.net/lists/listinfo/linux-india-programmers


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.