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 16:57:29 EDT (-0400)
  Re: [beta] source distribution of POV-Ray 3.6 for UNIX  
From: Wolfgang Wieser
Date: 3 Jul 2004 17:48:21
Message: <40e729a4@news.povray.org>
Thierry Boudet wrote:
> Thorsten Froehlich wrote:
>> 
>> #include <stdlib.h>
>> #include <stdio.h>
>> int main(int ac, char **av)
>> {
>>     printf("Result: %d\n", system(av[1]));
>>     return 0;
>> }
>> 
>> This should work and demonstrate that the system works correctly and only
> 
>     Don't work. In you invoke a.out with no args, av[1] is NULL.
>     nonsense code sometime give intended results...
>
You probably misunderstood Thorsten here. 

I think he meant the above program to be used instead of "echo $?", 
i.e.:

shell> ./thorstens_program PX

where PX is a program with exit code >256. 

Wolfgang


Post a reply to this message

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