2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

Do client script exit status checking more portably

This commit is contained in:
Ted Lemon
2001-03-14 15:37:52 +00:00
parent ae598b4274
commit ed0f73abbd

View 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,