From 24dcf41f3a653916a12e9ae3ed7c013454fcb6ca Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kaber/emailAddress=kaber@netfilter.org" Date: Mon, 19 Jun 2006 16:53:03 +0000 Subject: [PATCH]: Add new exit value to indicate concurrency issues (Jesper Dangaard Brouer ) --- include/iptables_common.h | 3 ++- iptables-standalone.c | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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 @@ 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); } -- cgit v1.2.3