Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
Subject: Re: Pb with C system call system()
Date: Mon, 7 Apr 1997 11:11:43 -0600 (MDT)	[thread overview]
Message-ID: <199704071711.LAA12241@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <9704071344.AA19006@romanee>

> 
> When I compile a C program on a DEC machine (for exemple DEC 3000/300LX) in
> which I use the system call "system()" and I run the program on my Alpha 500
> with Linux 2.0.23 (Redhat 4.0), I have an error (err = 32512) whereas it runs
> very well on the other DEC machine.

Hm, 32512 is 0x7f00, i.e. you are getting 127 shifted by 8 bits.

> 
> err=system("/bin/ls > toto");
> fprintf(stdout,"err = %d\n",err);

Manapage says:

       It  is  possible  for  the shell command to return 127, so
       that code is not a sure indication that the execve()  call
       failed; check errno to make sure.

So what about errno?

  Michal

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

      reply	other threads:[~1997-04-07 17:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-07 13:44 Pb with C system call system() provost
1997-04-07 17:11 ` Michal Jaegermann [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox