From: Matthew Dillon Date: Sun, 7 Jun 2015 02:47:35 +0000 (-0700) Subject: sh - Sync to FreeBSD d038ee76 part 2/2 (e) X-Git-Url: https://gitweb.dragonflybsd.org/~nant/dragonfly.git/commitdiff_plain/5d51e90618073d0454a6ae16a4e91b1e3ec9e572 sh - Sync to FreeBSD d038ee76 part 2/2 (e) * Reapply d9b533666 - mdoc nits. * Makefile adjustments for clean stderr * Fix minor coding error in recent commit.. --- diff --git a/bin/sh/Makefile b/bin/sh/Makefile index 5d4ce9f712..76bba657fa 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -12,8 +12,11 @@ GENSRCS= builtins.c nodes.c syntax.c GENHDRS= builtins.h nodes.h syntax.h token.h SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} -WARNS?= 3 -NO_WERROR= yes # [-Werror=clobbered] on gcc50 +# would be needed if WARNS upgraded to 3, but lets keep the stderr output +# clean, so WARNS has been lowered to 2. +# +# NO_WERROR= yes # [-Werror=clobbered] on gcc50 +WARNS?= 2 # MLINKS for Shell built in commands for which there are no userland # utilities of the same name are handled with the associated manpage, diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index a5d97d955a..5ee1105b03 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -178,7 +178,10 @@ setjobctl(int on) do { /* while we are in the background */ initialpgrp = tcgetpgrp(ttyfd); if (initialpgrp < 0) { -out: jobctl_notty(); +#if !defined(O_CLOEXEC) || !defined(F_DUPFD_CLOEXEC) +out: +#endif + jobctl_notty(); return; } if (initialpgrp != getpgrp()) { diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index ad33c29380..f8168184e0 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -2807,7 +2807,7 @@ will return the argument. .Xr chsh 1 , .Xr echo 1 , .Xr ed 1 , -.Xr emacs 1 , +.Xr emacs 1 Pq Pa editors/emacs , .Xr kill 1 , .Xr printf 1 , .Xr pwd 1 ,