]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Support for nommu arches
authorJan Engelhardt <vapier@gentoo.org>
Sun, 11 Oct 2009 07:56:18 +0000 (03:56 -0400)
committerHarald Welte <laforge@gnumonks.org>
Sun, 25 Oct 2009 09:57:56 +0000 (10:57 +0100)
Linux systems that lack a MMU cannot call fork(). Fortunately, the
only place in iptables that uses fork() follows it by an exec(), so
we can easily convert the code to vfork().

References: http://bugzilla.netfilter.org/show_bug.cgi?id=614

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
xtables.c

index 41e0b8717bda32f9afa4c1f7062fdf13feb772c8..4520124810cb6aaca0a03dcb0b4cdd5ecf93811a 100644 (file)
--- a/xtables.c
+++ b/xtables.c
@@ -331,7 +331,7 @@ int xtables_insmod(const char *modname, const char *modprobe, bool quiet)
         */
        fflush(stdout);
 
-       switch (fork()) {
+       switch (vfork()) {
        case 0:
                argv[0] = (char *)modprobe;
                argv[1] = (char *)modname;