Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2019 20:25:07 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r344237 - stable/12/sbin/dhclient
Message-ID:  <201902172025.x1HKP79a063377@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902172025.x1HKP79a063377>