]> granicus.if.org Git - flex/commitdiff
FLEX_EXIT() is the preferred way to exit flex
authorJeff Smith <whydoubt@gmail.com>
Mon, 10 Apr 2017 15:01:36 +0000 (10:01 -0500)
committerWill Estes <westes575@gmail.com>
Tue, 2 May 2017 19:31:05 +0000 (15:31 -0400)
src/filter.c

index 33e5ced3059b307e6bac97e762514ae3f5a8aad7..71f3635fe5200a357560857466a2193f459dcef6 100644 (file)
@@ -176,7 +176,7 @@ clearerr(stdin);
 
                        if ((r = chain->filter_func (chain)) == -1)
                                flexfatal (_("filter_func failed"));
-                       exit (0);
+                       FLEX_EXIT (0);
                }
                else {
                        execvp (chain->argv[0],
@@ -185,7 +185,7 @@ clearerr(stdin);
                     chain->argv[0]);
                }
 
-               exit (1);
+               FLEX_EXIT (1);
        }
 
        /* Parent */
@@ -324,7 +324,7 @@ int filter_tee_header (struct filter *chain)
 
        while (wait (0) > 0) ;
 
-       exit (0);
+       FLEX_EXIT (0);
        return 0;
 }