Navratova hodnota procesu z open("|prikaz") ?
Honza Pazdziora
adelton na informatics.muni.cz
Pondělí Únor 11 19:42:35 MET 2002
On Mon, Feb 11, 2002 at 07:36:14PM +0100, Ladislav Vaiz wrote:
> spoustim pres open() prikaz (fetchmail), kteremu do standardniho vstupu
> zapisuji konfiguraci. Jak zjistim navratovou hodnotu procesu?
perlvar(1):
$? The status returned by the last pipe close, backtick
(``) command, or system() operator. Note that this
is the status word returned by the wait() system
call (or else is made up to look like it). Thus,
the exit value of the subprocess is actually ($? >>
8), and $? & 127 gives which signal, if any, the
process died from, and $? & 128 reports whether
there was a core dump. (Mnemonic: similar to sh and
ksh.)
Tedy predpokladam, ze pod navratovou hodnotou procesu myslite to, co
se stane po close, nikoli po open (po open typicky zadny proces nic
nevraci).
--
------------------------------------------------------------------------
Honza Pazdziora | adelton na fi.muni.cz | http://www.fi.muni.cz/~adelton/
.project: Perl, DBI, Oracle, MySQL, auth. WWW servers, DBD::XBase.
------------------------------------------------------------------------
Další informace o konferenci Perl