Return-Code of "system" on a 64-bit system

  • Follow


Hi,

I use these statements under Perl 5.6.x on SuSE Linux 7.2 (32-bit
system) and under Perl 5.8.x on Suse Linux Enterprise Server 9
(64-bit-system):

my $rc=system("ps -p 4711");
if ($rc==0)
{
    # do this
}
else
{
    # do that
}

If process "4711" is running, $rc contains "0" under Suse 7.2 (32-bit),
but it contains "-1" under Suse 9 (64-bit).

Why?

Thank you...

Many greetings from Hannover, Germany

0
Reply ulrich.knaack (1) 12/18/2005 12:35:55 AM

Moin Ulli,

la 18.12.2005 01:35 Sergeant_Pepper skribis:
> I use these statements under Perl 5.6.x on SuSE Linux 7.2 (32-bit
> system) and under Perl 5.8.x on Suse Linux Enterprise Server 9
> (64-bit-system):
> 
> my $rc=system("ps -p 4711");
> if ($rc==0)
> {
>     # do this
> }
> else
> {
>     # do that
> }
> 
> If process "4711" is running, $rc contains "0" under Suse 7.2 (32-bit),
> but it contains "-1" under Suse 9 (64-bit).

Nö, -1 bedeutet, daß der Befehl nicht gestartet werden konnte (z.B. kaputter 
$PATH, oder keine Ausführungsrechte).


coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

-- 
lerne / learn / apprends / lär dig / ucz siÄ™    Esperanto:
                     http://lernu.net  /  http://ikurso.net
0
Reply Daniel 12/18/2005 10:51:04 PM


Hi, Daniel,

thanks for answering.

I knew the meaning of "-1" (error starting process), but that's not the
solution. I checked this aspect...

Greetings

0
Reply Sergeant_Pepper 12/19/2005 8:08:10 AM

2 Replies
302 Views

(page loaded in 0.088 seconds)

Similiar Articles:













7/23/2012 7:29:19 PM


Reply: