From owner-svn-src-head@FreeBSD.ORG Wed Jan 19 00:43:43 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD008106564A; Wed, 19 Jan 2011 00:43:43 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id AA0558FC17; Wed, 19 Jan 2011 00:43:42 +0000 (UTC) Received: by wyf19 with SMTP id 19so292668wyf.13 for ; Tue, 18 Jan 2011 16:43:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=XUR4dVAxCJOP7VPUbsqy9DJ7Xt5F7DL7vgR1OM8CGbU=; b=u/EyFFJ+Y8Dze5PZtQt+rNGT5skXjQlYQA29XJxVjAv2FcPceC9PzJY/9d7weJgsiD p8O0/8Sz3GU7rnJX8BqkxGvoTNgaTNrx3MCrufXxWVJV7GcdvnskLwX6I5R1iR3X8eed H5wCvAf9ULkfNobZeRsPw4lRcNd58Ojc4krEQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=mDGzjfBljBVzuCL81swZjwCSWMBNK8FG+jXDYyGT1w6d8fZ1XgYwlQ9VJ26wZjIzjA jY0S/3ROEaGF/6u6ozZu/Ar9kS3HoZZ/CemzxCbd6E4gxtWpcSnqrd4byRdPYlUxg1jO 23hnpJ+RKKob7ze1ILNSN8ZlzOUoNdDksNRao= MIME-Version: 1.0 Received: by 10.216.78.146 with SMTP id g18mr33347wee.1.1295397821606; Tue, 18 Jan 2011 16:43:41 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.254.226 with HTTP; Tue, 18 Jan 2011 16:43:41 -0800 (PST) In-Reply-To: <4D3631DE.8040408@FreeBSD.org> References: <201101182118.p0ILIWA4052343@svn.freebsd.org> <4D3631DE.8040408@FreeBSD.org> Date: Tue, 18 Jan 2011 16:43:41 -0800 X-Google-Sender-Auth: S8SDYgNwABLCaxS5FQBOESawmkw Message-ID: From: Garrett Cooper To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Jilles Tjoelker , 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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2011 00:43:43 -0000 On Tue, Jan 18, 2011 at 4:35 PM, Doug Barton wrote: > On 01/18/2011 14:33, Garrett Cooper wrote: >> >> On Tue, Jan 18, 2011 at 1:18 PM, Jilles Tjoelker >> =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.