1. how to test whether a program is running?

How can I test whether a program is running?
For example how can I test whether Mozilla is running?

new topic     » topic index » view message » categorize

2. Re: how to test whether a program is running?

Jerry Story wrote:
> 
> How can I test whether a program is running?
> For example how can I test whether Mozilla is running?
> 

It depends on what Operating System you are refering to.  Windows or Linux.

Mario Steele
http://enchantedblade.trilake.net
Attaining World Dominiation, one byte at a time...

new topic     » goto parent     » topic index » view message » categorize

3. Re: how to test whether a program is running?

Mario Steele wrote:
> 
> Jerry Story wrote:
> > 
> > How can I test whether a program is running?
> > For example how can I test whether Mozilla is running?
> > 
> 
> It depends on what Operating System you are refering to.  Windows or Linux.

First Linux. Then later maybe Windows, so the program will work on both
Linux and Windows.

new topic     » goto parent     » topic index » view message » categorize

4. Re: how to test whether a program is running?

if is_file_open("Mozilla") then

Don Cole
sf

new topic     » goto parent     » topic index » view message » categorize

5. Re: how to test whether a program is running?

don cole wrote:
> 
> if is_file_open("Mozilla") then
> 
> Don Cole
> sf
> 

LOL... well put, you could fool anyone with that. tongue

Regards,
Vincent

--
Without walls and fences, there is no need for Windows and Gates.

new topic     » goto parent     » topic index » view message » categorize

6. Re: how to test whether a program is running?

Jerry Story wrote:
> 
> Mario Steele wrote:
> > 
> > Jerry Story wrote:
> > > 
> > > How can I test whether a program is running?
> > > For example how can I test whether Mozilla is running?
> > > 
> > 
> > It depends on what Operating System you are refering to.  Windows or Linux.
> 
> First Linux. Then later maybe Windows, so the program will work on both
> Linux and Windows.
> 

If you run "mozilla &", you'll get a pid, alongside a few other things written
into standard output... Then you can use ps to check what programs are running
and their pid...

I'm not 100% sure how it'd be done, try redirecting the output from "mozilla &"
to a file, and check the man page of ps... but you'll have to poll the output of
ps in regular intervals...

I can't check it either, I'm going away for the weekend and I don't have access
to linux atm. I hope this will help.

Regards, Alexander Toresson

new topic     » goto parent     » topic index » view message » categorize

7. Re: how to test whether a program is running?

Depending on your needs....

If you want to test if another eu program is already running you could
hook an interrupt and get it to return FFFFh in AX when called with a
unique value in AX.

Another program can call the interrupt with AX set to the unique value
and check to see if FFFFh is returnd in AX. or esle an interrupt error
code is usualy generated by the defualt interrupt.

This is the prefered method used to test for most TSR programs.

new topic     » goto parent     » topic index » view message » categorize

8. Re: how to test whether a program is running?

Jerry Story wrote:
> 
> How can I test whether a program is running?
> For example how can I test whether Mozilla is running?

I have that figured out now for Linux.

This lists all the processes by name in a file.
system("ps -e > " & JUNK_FILE,2)  

Then search the file.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu