SYSTEM vs USER

Kenneth Brody kenbrody at bestweb.net
Thu Aug 4 14:33:03 PDT 2005


Quoting Tyler Cameron Style (Thu, 4 Aug 2005 14:19:57 -0700):

>
> The documentation I have says the overhead for SYSTEM is pretty hefty,
> and to use USER instead.

Which documentation says that?

SYSTEM and USER are for two different things.  Specifically, USER is
a two-way street, with filePro passing info to it, and being able to
read results back.  SYSTEM is a simple "run this" command.

That said, some people use USER to start a command shell, and then
pass it commands to be executed.  This does save on the overhead of
starting a new shell each time, but unless you're executing shell
builtins, you still have the overhead of starting the program you
are executing.

> Which is better for performing very basic OS
> functions, like kicking off a script or printing/chmod'ing a file?
>
> (EG) system "/usr/bin/moocow_test"
>
>      VS
>
>      user cow = /usr/bin/moocow_test
>      cow=""     'would this be necessary to have it execute, or is
>                 'just user good enough?
>
> Anyone have experience with comparing/contrasting these two puppies
> who would like to share?

My personal opinion is use USER for programs which need the continual
(or at least repeated) communication with filePro, and SYSTEM for
commands which are simply "run and be done with it".

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list