From: kst@sd.aonix.com (Keith Thompson)
Subject: Re: Need help re: System Calls
Date: 1997/04/14
Date: 1997-04-14T00:00:00+00:00 [thread overview]
Message-ID: <E8nGoD.8n8@thomsoft.com> (raw)
In-Reply-To: 1997Apr12.220404.1@eisner
In <1997Apr12.220404.1@eisner> kilgallen@eisner.decus.org (Larry Kilgallen) writes:
[...]
> I understood "spawn" from this discussion to provide access to a CLI,
> but what is valid from that point on certainly varies between
> operating systems, and as I understand it, even between Unix
> variants. In general it would seem that portability of access
> to "system" capabilities is not helpful between domains where
> those capabilities are not identical.
By the way, the system() function is part of the ISO C standard, so it's
very likely that you can use the features of Annex B to invoke it in a
nearly portable manner if there's a C library available on your system.
Here's the definition (typos mine):
7.10.4.5 The system function
Synopsis
#include <stdlib.h>
int system(const char *string);
Description
The system function passes the string pointed to by string to
the host environment to be executed by a command processor in an
implementation-defined manner. A null pointer may be used for string
to inquire whether a command processor exists.
Returns
If the argument is a null pointer, the system function returns nonzero
only if a command processor is available. If the argument is not a
null pointer, the system function returns an implementation-defined
value.
Of course, the interpretation of the parameter is entirely
implementation-defined. On a Unix or Unix-like system, it's typically
passed to some version of the Bourne shell (/bin/sh).
--
Keith Thompson (The_Other_Keith) kst@sd.aonix.com <http://www.aonix.com> <*>
TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix
5040 Shoreham Place, San Diego, CA, USA, 92122-5989
"Humor is such a subjective thing." -- Cartagia
next prev parent reply other threads:[~1997-04-14 0:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-04-07 0:00 Need help re: System Calls Chris Morgan
1997-04-07 0:00 ` Robert Dewar
1997-04-10 0:00 ` Keith Thompson
1997-04-12 0:00 ` Robert Dewar
1997-04-12 0:00 ` Robert Dewar
1997-04-13 0:00 ` Larry Kilgallen
1997-04-13 0:00 ` Robert Dewar
1997-04-14 0:00 ` Keith Thompson [this message]
[not found] <Pine.SGI.3.94.970406210904.4241A-100000@sandcast <860461839.15snx@jvdsys.nextjk.stuyts.nl>
1997-04-09 0:00 ` Keith Thompson
-- strict thread matches above, loose matches on Subject: below --
1997-04-08 0:00 Jerry van Dijk
1997-04-06 0:00 Bill Roland
1997-04-07 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox