On 3/14/07, Kon Lovett <[EMAIL PROTECTED]> wrote:
Zbigniew wrote: > Exit values should be distinguishable from signals (and even from > signals+core dumps).
return C_fix(WIFEXITED(n) ? WEXITSTATUS(n) : (WIFSIGNALED(n) ? WTERMSIG(n) : WSTOPSIG(n)));
I don't always talk thru my hat ;-)
Don't worry, I would expect nothing less from you. I figured you had already checked the code and the return value might be munged. In my experience, on a UNIX box it is imperative that you get the full range of information provided by system(), especially since Chicken's intent is to be as practical as possible. My opinion is that (system) should return system()'s raw return value-- i.e. C_fix(n) --and that accessor functions be provided to tease that information apart, along the lines of the C macros. Since (system) is in unit library and much is deliberately left to the vagaries of the system, it may be more acceptable to create a new function and accessors in Unit posix. (Or in a separate egg so people don't need cutting-edge Chicken?) _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
