Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 May 2014 13:27:31 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r265772 - head/bin/sh
Message-ID:  <201405091327.s49DRVwL060872@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Fri May  9 13:27:30 2014
New Revision: 265772
URL: http://svnweb.freebsd.org/changeset/base/265772

Log:
  sh: Add more necessary INTOFF/INTON.

Modified:
  head/bin/sh/main.c
  head/bin/sh/options.c

Modified: head/bin/sh/main.c
==============================================================================
--- head/bin/sh/main.c	Fri May  9 13:23:23 2014	(r265771)
+++ head/bin/sh/main.c	Fri May  9 13:27:30 2014	(r265772)
@@ -140,11 +140,13 @@ main(int argc, char *argv[])
 #endif
 	rootpid = getpid();
 	rootshell = 1;
+	INTOFF;
 	initvar();
 	setstackmark(&smark);
 	setstackmark(&smark2);
 	procargs(argc, argv);
 	pwd_init(iflag);
+	INTON;
 	if (iflag)
 		chkmail(1);
 	if (argv[0] && argv[0][0] == '-') {

Modified: head/bin/sh/options.c
==============================================================================
--- head/bin/sh/options.c	Fri May  9 13:23:23 2014	(r265771)
+++ head/bin/sh/options.c	Fri May  9 13:27:30 2014	(r265772)
@@ -475,7 +475,9 @@ atend:
 			}
 			else {
 				out1fmt("Illegal option -%c\n", c);
+				INTOFF;
 				(void) unsetvar("OPTARG");
+				INTON;
 			}
 			c = '?';
 			goto bad;
@@ -494,7 +496,9 @@ atend:
 			}
 			else {
 				out1fmt("No arg for -%c option\n", c);
+				INTOFF;
 				(void) unsetvar("OPTARG");
+				INTON;
 				c = '?';
 			}
 			goto bad;



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