Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 May 2013 01:13:43 +0200
From:      Jilles Tjoelker <jilles@stack.nl>
To:        "Simon J. Gerraty" <sjg@juniper.net>
Cc:        svn-src-head@freebsd.org, Tijl Coosemans <tijl@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org
Subject:   Re: svn commit: r250699 - in head: share/mk usr.bin/make
Message-ID:  <20130517231343.GC89969@stack.nl>
In-Reply-To: <20130517222810.59BDB58097@chaos.jnpr.net>
References:  <201305161528.r4GFSc5t094460@svn.freebsd.org> <5196745E.7040905@FreeBSD.org> <20130517193906.1675358097@chaos.jnpr.net> <5196A250.8030305@FreeBSD.org> <20130517222810.59BDB58097@chaos.jnpr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 17, 2013 at 03:28:10PM -0700, Simon J. Gerraty wrote:
> On Fri, 17 May 2013 23:34:08 +0200, Tijl Coosemans writes:
> >When the output of /usr/local/libexec/portconf is empty make
> >warns about it:

> Yes.  This is to avoid accidents.
> If you *know* that no output is a valid result, you can add '; echo' to
> the end of the command to suppress the warning.

> >make: "/etc/make.conf" line 115: warning: Couldn't read shell's output fo=
> >r
> >"/usr/local/libexec/portconf"

Note that adding '; echo' will result in an additional fork() or vfork()
call. If -c /usr/local/libexec/portconf is given, FreeBSD sh execs
portconf. If there is an echo command after it, sh will have to (v)fork.

In NetBSD, this is not a concern because NetBSD sh (v)forks in either
case.

Placing the echo before the external command will let FreeBSD sh avoid
the fork as well, but some common other shells (bash, recent mksh) will
not fork for -c external but will fork for -c builtin;external.

-- 
Jilles Tjoelker



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