Add new exit value to indicate concurrency issues (Jesper Dangaard Brouer <hawk@comx.dk>)
diff --git a/include/iptables_common.h b/include/iptables_common.h
index 28bda9f..64723c3 100644
--- a/include/iptables_common.h
+++ b/include/iptables_common.h
@@ -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 */
diff --git a/iptables-standalone.c b/iptables-standalone.c
index 257b677..e5c7841 100644
--- a/iptables-standalone.c
+++ b/iptables-standalone.c
@@ -64,9 +64,13 @@
 	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);
 }