]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Do client script exit status checking more portably
authorTed Lemon <source@isc.org>
Wed, 14 Mar 2001 15:37:52 +0000 (15:37 +0000)
committerTed Lemon <source@isc.org>
Wed, 14 Mar 2001 15:37:52 +0000 (15:37 +0000)
client/dhclient.c

index 0f9923759c5b48d8581565938d090292397b81bc..f4e274b8a5159b437a0109f950cd8385ef4da382 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhclient.c,v 1.122 2001/02/26 22:21:04 mellon Exp $ Copyright (c) 1995-2001 Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhclient.c,v 1.123 2001/03/14 15:37:52 mellon Exp $ Copyright (c) 1995-2001 Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -2439,7 +2439,8 @@ int script_go (client)
        }
        dfree (envp, MDL);
        GET_TIME (&cur_time);
-       return wstatus & 0xff;
+       return (WIFEXITED (wstatus) ?
+               WEXITSTATUS (wstatus) : -WTERMSIG (wstatus));
 }
 
 void client_envadd (struct client_state *client,