Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2012 16:25:53 -0700
From:      "Simon J. Gerraty" <sjg@juniper.net>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, "David E. O'Brien" <obrien@FreeBSD.org>, sjg@juniper.net, Ruslan Ermilov <ru@FreeBSD.org>, svn-src-head@FreeBSD.org
Subject:   Re: svn commit: r238563 - head/gnu/usr.bin/groff/tmac
Message-ID:  <20120821232553.35D4F58085@chaos.jnpr.net>
In-Reply-To: <20120821222943.GA27203@stack.nl>
References:  <201207180557.q6I5vheM034018@svn.freebsd.org> <20120726084903.GA48240@lo0.su> <20120821053519.BD5A158085@chaos.jnpr.net> <20120821222943.GA27203@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, 22 Aug 2012 00:29:44 +0200, Jilles Tjoelker writes:
>On FreeBSD, the first two statements are partially false. All sh(1)
>builtins that correspond to utilities specified by POSIX (but not
>special builtins) have versions accessible to execve() (on 8.x and

That's interesting, especially for 'cd', though is there any use case in
which it is actually useful? I'm drawing a blank.

>older, hash, type and ulimit are missing). This includes cd but not
>chdir, since chdir is not specified by POSIX. Also, FreeBSD make
>includes a somewhat arbitrary list of shell builtins, including cd, that
>cause it to invoke the shell even if there are no metacharacters.

Yes, I pondered whether something like that might be worthwhile,
but since a bare 'cd somewhere' all by itself is rather pointless, it
seemed a corner case.

>> A better way to construct targets like this is to put any excursion out
>> of .OBJDIR inside ():
>
>> 	(cd ${.CURDIR} && \
>> 	${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
>> 	koi8-r.tmac hyphen.ru ${DESTDIR}${TMACDIR})
>
>> then the cd ${.OBJDIR} isn't needed at all.
>> note use of && rather than ; which can be very dangerous
>
>This method makes more sense and should hardly cost any performance.

Agreed.



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