Re: svn commit: r268641 - head/usr.sbin/service

看板FB_svn作者時間11年前 (2014/07/16 03:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/11 (看更多)
On Tue, Jul 15, 2014 at 12:59:05PM -0500, Bryan Drewery wrote: > On 7/14/2014 9:18 PM, Devin Teske wrote: > > Author: dteske > > Date: Tue Jul 15 02:18:55 2014 > > New Revision: 268641 > > URL: http://svnweb.freebsd.org/changeset/base/268641 > > > > Log: > > Fix an issue with service(8) where utilities such as screen(1) and tmux(1) > > would behave differently when utilizing rc-script was invoked manually vs. > > service(8). The issue being that these utilities require the TERM environ > > variable to be set and service(8) was not passing it down. > > > > Reported by: Michael Dexter <editor@callfortesting.org> > > PR: bin/191869 > > Reviewed by: allanjude > > MFC after: 3 days > > X-MFC-to: stable/10, stable/9 > > > > Modified: > > head/usr.sbin/service/service.sh > > > > Modified: head/usr.sbin/service/service.sh > > ============================================================================== > > --- head/usr.sbin/service/service.sh Tue Jul 15 01:03:29 2014 (r268640) > > +++ head/usr.sbin/service/service.sh Tue Jul 15 02:18:55 2014 (r268641) > > @@ -139,7 +139,7 @@ cd / > > for dir in /etc/rc.d $local_startup; do > > if [ -x "$dir/$script" ]; then > > [ -n "$VERBOSE" ] && echo "$script is located in $dir" > > - exec env -i HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin $dir/$script $* > > + exec env -i HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin TERM="$TERM" $dir/$script $* > > fi > > done > > > > > > Hm, I'm not sure about this. The "behaves differently" is exactly the > reason for service(8). It runs with a clean environment such as the boot > does. Running an rc script without service(8) will give wrong behavior > in many scripts that do not match boot-time behavior. > Indeed, the whole point is to NOT inherit anything from calling process. > As far as I can tell, TERM is not set on boot. So the rc script would > also not work on boot. So this change is wrong. > Yes, but maybe there is a sensible default that could be used? Alternatively, one would have to fixup rc scripts using tmux to do what's best for them. Either, the change as it is looks wrong. Please revert for the time being. -- Mateusz Guzik <mjguzik gmail.com> _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
文章代碼(AID): #1JnO6ohL (FB_svn)
討論串 (同標題文章)
文章代碼(AID): #1JnO6ohL (FB_svn)