Concurrency issues with the iptables userspace program andexitcodes

Jesper Dangaard Brouer jdb at comx.dk
Thu Jun 1 11:15:49 CEST 2006


Hi

I have experienced some concurrency issues with the iptables
userspace program.  Executing an iptables (write) command while
another (write command) is running causes a failure of the command.
Well, this is the expected semantics of a non-blocking call, but the
issue is how the error situation is reported back.

The iptables command detects the situation and reports:
 "iptables: Resource temporarily unavailable"

With shell exitcode "1".  What annoys me is that the shell exitcode
is "1", which is also used for "normal" errors.  This means that my
code/scripts needs to parse output from stderr to distinguish it from
normal/expected errors.

I propose that the exitcode of "Resource temporarily unavailable"
error is changed to something unique for this situation.

Comments?

-- 
Med venlig hilsen / Best regards
  Jesper Brouer
  ComX Networks A/S
  Linux Network developer
  Cand. Scient Datalog / MSc.
  Author of http://adsl-optimizer.dk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : /pipermail/netfilter-devel/attachments/20060601/a5416b1e/attachment.pgp


More information about the netfilter-devel mailing list