> command. The main 2 being....
>
> WIFEXITED(status)
> is non-zero if the child exited normally.
>
> WEXITSTATUS(status)
> evaluates to the least significant eight bits of
> the return code of the child which terminated,
> which may have been set as the argument to a call
> to exit() or as the argument for a return statement
> in the main program. This macro can only be evalu
> ated if WIFEXITED returned non-zero.
>
>
> I believe that in many unixlike systems the return value of system()
> is
(program_return_value<<8)+SomeOtherStuffToDoWithWhetherShellRanCmdOK
>
> So use the macros provided and all will be as expected.
>
Duh, RTFM.
Many thanks for detailing that. That's clearly the clean reliable way
to recover the status. I'd even seen that reference to wait(2)
recently but had not followed it through.
All is fine now. My screen values reflect the state of the hardware.
This has allowed me so side step the other issue about the browser
hanging around for child processes so I can brush that one under the
carpet for now.
It's taken me about 4 months longer than I originally anticipated but
I now have a system I can pull some live data off.
Many thanks for you help and support.
/jacques.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|