]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Add new exit value to indicate concurrency issues (Jesper Dangaard Brouer <hawk@comx...
authorJesper Dangaard Brouer <hawk@comx.dk>
Mon, 19 Jun 2006 16:53:03 +0000 (16:53 +0000)
committerPatrick McHardy <kaber@trash.net>
Mon, 19 Jun 2006 16:53:03 +0000 (16:53 +0000)
include/iptables_common.h
iptables-standalone.c

index 28bda9f4217cdc90bdbf865fdca9c795e6ac135c..64723c3c5b233cd095f782617827cf0afdb1abb8 100644 (file)
@@ -5,7 +5,8 @@
 enum exittype {
        OTHER_PROBLEM = 1,
        PARAMETER_PROBLEM,
-       VERSION_PROBLEM
+       VERSION_PROBLEM,
+       RESOURCE_PROBLEM
 };
 
 /* this is a special 64bit data type that is 8-byte aligned */
index 257b677743110e2a8767e2564889b92d0a04764e..e5c7841d9ff786fb4d06246e1cb40593adf87041 100644 (file)
@@ -64,9 +64,13 @@ main(int argc, char *argv[])
        if (ret)
                ret = iptc_commit(&handle);
 
-       if (!ret)
+       if (!ret) {
                fprintf(stderr, "iptables: %s\n",
                        iptc_strerror(errno));
+               if (errno == EAGAIN) {
+                       exit(RESOURCE_PROBLEM);
+               }
+       }
 
        exit(!ret);
 }