From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199704071711.LAA12241@ellpspace.math.ualberta.ca> Date: Mon, 7 Apr 1997 11:11:43 -0600 (MDT) From: Michal Jaegermann Subject: Re: Pb with C system call system() 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