Author: jilles Date: Sun Feb 17 20:25:07 2019 New Revision: 344237 URL: https://svnweb.freebsd.org/changeset/base/344237
Log: MFC r343896,r343922: dhclient: Pass through exit status from script The wait status is translated into 8 bits the same way as the shell calculates $?. Modified: stable/12/sbin/dhclient/dhclient.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/dhclient/dhclient.c ============================================================================== --- stable/12/sbin/dhclient/dhclient.c Sun Feb 17 18:32:19 2019 (r344236) +++ stable/12/sbin/dhclient/dhclient.c Sun Feb 17 20:25:07 2019 (r344237) @@ -2350,7 +2350,8 @@ priv_script_go(void) if (ip) script_flush_env(ip->client); - return (wstatus & 0xff); + return (WIFEXITED(wstatus) ? + WEXITSTATUS(wstatus) : 128 + WTERMSIG(wstatus)); } void _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"