From: Ted Lemon Date: Wed, 14 Mar 2001 15:37:52 +0000 (+0000) Subject: Do client script exit status checking more portably X-Git-Tag: V3-BETA-2-PATCH-19~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed0f73abbd8fe23675bb0c578eca6451c751ce9b;p=thirdparty%2Fdhcp.git Do client script exit status checking more portably --- diff --git a/client/dhclient.c b/client/dhclient.c index 0f9923759..f4e274b8a 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -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,