Using SHELL to get a list of processes
Hugh Senior
h at FlexibleLearning.com
Thu Feb 5 14:12:38 EST 2009
Duh!
I just found TASKLIST which works... get shell("TASKLIST").
And the processID returns the id of the app.
So I think I have got the necessary bits to check for multiple instances
now.
Apologies for bandwidth. Maybe this will help someone searching the archives
in the future.
/H
-----Original Message-----
From: Hugh Senior [mailto:h at FlexibleLearning.com]
Sent: 05 February 2009 18:56
To: use-revolution at lists.runrev.com
Subject: Using SHELL to get a list of processes
Goal:
Using shell()to determine if my Rev app is among the line of all running
processes. If so, then user has started a second instance and I want to
quit.
Task 1: Get a list of all running processes and IDs.
Task 2: Get the process name and ID of my Rev app.
With me so far? Okay...
I should be able to get a list of all running process using "ps -e"
(according to http://www.ss64.com/bash/ps.html).
So I try this in the message box, hoping to see some sort of a list:
answer shell("ps -e")
What I get instead is 'ps is not recognised as an internal or external
command, operable program or batch file.'
Same result using shell("top") and shell("list-processes").
So what stupidity am I doing, please (apart from naively expecting the
syntax to work)? And how do I get the process name & ID of the app?
/H
More information about the use-livecode
mailing list