On Friday 2009-02-20 22:58, Ralf wrote: > Jan Engelhardt wrote: >> On Friday 2009-02-20 21:33, Ralf wrote: >> >>> Sometimes an insert operation (-I) fails and iptables returns 256. >>> Under which circumstances can iptables give a return code 256 ? >> >> Never should this happen, because the lower 8 bits of 256 that >> make up the exist status are 0 actually. >> Or where do you see 256? [I thought about $? first...] > > int rc = system(sz); // sz="iptables ..." > > rc is sometimes definitely 256 ! > > What does it mean? Humph humph, this is not a C forum! man 3 system: RETURN VALUE The value returned is -1 on error (e.g. fork(2) failed), and the return status of the command otherwise. This latter return status is in the format specified in wait(2). Thus, the exit code of the command will be WEXITSTATUS(status). In case /bin/sh could not be executed, the exit status will be that of a command that does exit(127). -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html