Date: Tue, 18 Jan 2011 16:43:41 -0800 From: Garrett Cooper <gcooper@FreeBSD.org> To: Doug Barton <dougb@freebsd.org> Cc: Jilles Tjoelker <jilles@freebsd.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217557 - in head: bin/sh tools/regression/bin/sh/execution Message-ID: <AANLkTinxgfjBO4rvK0AgvXde_H4uT_iffyB4t43wRBuf@mail.gmail.com> In-Reply-To: <4D3631DE.8040408@FreeBSD.org> References: <201101182118.p0ILIWA4052343@svn.freebsd.org> <AANLkTiku_GTXf=65m8RK4_RhD7ib5sZOzvvUFc26nvyJ@mail.gmail.com> <4D3631DE.8040408@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 18, 2011 at 4:35 PM, Doug Barton <dougb@freebsd.org> wrote: > On 01/18/2011 14:33, Garrett Cooper wrote: >> >> On Tue, Jan 18, 2011 at 1:18 PM, Jilles Tjoelker<jilles@freebsd.org> >> =A0wrote: >>> >>> Author: jilles >>> Date: Tue Jan 18 21:18:31 2011 >>> New Revision: 217557 >>> URL: http://svn.freebsd.org/changeset/base/217557 >>> >>> Log: >>> =A0sh: Fix signal messages being sent to the wrong file sometimes. >>> >>> =A0When a foreground job exits on a signal, a message is printed to std= out >>> =A0about this. The buffer was not flushed after this which could result= in >>> the >>> =A0message being written to the wrong file if the next command was a >>> builtin >>> =A0and had stdout redirected. > > Does this mean that portmaster is going to stop printing those !*@%$@(# > "Terminated" messages that I have never been able to figure out how to ge= t > rid of, or am I just a loser? :) Don't know. I noticed it because the posix testsuite has a program that traps SIGALRM (system/OS dependent signal number) for the purpose of watchdog'ing testcases so they don't hang. So it was doing something like this: $ sh $ python -c 'import os, signal; os.kill(0, signal.SIGALRM)' >/dev/null 2>&1; echo $? > foo; echo "FOO:"; cat foo FOO: Alarm clock 142 $ I would expect FOO: to follow Alarm clock, not precede it. Whether or not this fixes portmaster, I dunno... try running bash or dash instead of /bin/sh to see whether or not the `problem' still occurs. HTH, -Garrett PS Shells printing out Terminated, Alarm clock, etc is in the POSIX spec II= RC.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinxgfjBO4rvK0AgvXde_H4uT_iffyB4t43wRBuf>