SYSTEM Command question
Bob Stockler
bob at trebor.iglou.com
Thu Dec 1 13:28:27 PST 2005
Doug Luurs wrote (on Thu, Dec 01, 2005 at 03:58:58PM -0500):
| Anyone know if it is possible to retrieve the Exitcode from a SYSTEM
| command ?
Yes.
No.
That is, filePro doesn't capture the exit value of a SYSTEM
command and return it to the process executing SYSTEM.
You can, however, put the command in a shell script that
executes whatever it is you want executed, then echo $? to
a temporary file that you read using OPEN(), READLINE() and
CLOSE() (on UNIX/Linux anyway).
Or, possibly (on UNIX/Linux) you could put the command in a
shell script that was executed by the USER command, then
read what the USER program returned. BTW, it's handy to
use OPEN(), WRITELINE() and CLOSE() to write shell scripts,
on the fly, to be used by the USER command.
It would be handy if SYSTEM did return an exit value.
Bob
--
Bob Stockler +-+ bob at trebor.iglou.com +-+ http://members.iglou.com/trebor
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).
More information about the Filepro-list
mailing list