From ed0f73abbd8fe23675bb0c578eca6451c751ce9b Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Wed, 14 Mar 2001 15:37:52 +0000 Subject: [PATCH] Do client script exit status checking more portably --- client/dhclient.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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, -- 2.47.2