Hi,
I would like some confirmation of what I think is happening with an
exit value.
I have a cgi that is written in C and a control prog based on
adc_logger also in C. These both then run on the ARM.
char get_portA ()
{
return(*portA_dr);
}
....
pump_state=get_portA();
.....
fprintf(stderr,"pump_state on return=%d",pump_state);
if (state_request) exit(get_portA());
...
} // end of main
I call this from my cgi responder:
strcpy(cmd,"./adc_logger -s");
if ( 0>(resp=system(cmd)) ) { // -1 fork failed
...
} else {
printf(text_head);
printf("pump_state=%d\n",resp);
exit(0);
Now the error log shows pump_state=23 , which was correct but by the
time it gets back the browser on x86 it's 5888 , as hex 1700 !
So there seems to be byte reversal.
Is this due to archectecture differences?! I dont think I need to
know the hardware to get the correct answer so why is this happening?
BTW , I call the cgi via an xhttp object in javascript.
Thanks for any help.
/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/
|