POV-Ray : Newsgroups : povray.unix : [beta] source distribution of POV-Ray 3.6 for UNIX : Re: [beta] source distribution of POV-Ray 3.6 for UNIX Server Time
8 Jul 2024 17:01:23 EDT (-0400)
  Re: [beta] source distribution of POV-Ray 3.6 for UNIX  
From: Wolfgang Wieser
Date: 3 Jul 2004 12:30:37
Message: <40e6df2c@news.povray.org>
Thorsten Froehlich wrote:

> No, it is most likely just the shell that is broken (given the source of
> the
> shells in most free Unix distributions, this is hardly surprising).  
>
First of all, this is simply wrong, see below. 

But even in case it were true, it seems to me that this does not match 
the problem because the configure script is being interpreted by a shell. 

> Try 
> something like
> 
> #include <stdlib.h>
> #include <stdio.h>
> int main(int ac, char **av)
> {
>     printf("Result: %d\n", system(av[1]));
>     return 0;
> }
> 
Okay, and if you read the man page you knew the exit code of system() 
is that of wait(2) or waitpid(2) which is a plain integer storing the 
exit code in the least significant byte accessible using 
WEXITSTATUS(status). 
And the other bytes store things like the signal which killed the program. 

I just verified that the code presented by you above will NOT work as you 
expect on: 
  Darwin-PPC (MacOS-X)
  Linux-ix86
  FreeBSD-ix86
  NetBSD-ix86
  Solaris-5.9-ix86
(Nicolas: maybe I could run some checks for you on these boxes. 
I forgot that in my previous answer; but I doubt I can test cross-compiling 
using these.)

All these systems (and probably most other UNICes) behave in the way I 
described. 

> This should work and demonstrate that the system works correctly and only
> the shell is broken.  Then file a bug report at the appropriate place.
> 
OOPS... You'd better test yourself before posting :p

Wolfgang


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.