From owner-svn-src-all@freebsd.org Sun Jul 12 08:47:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72D49999A4E; Sun, 12 Jul 2015 08:47:14 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FD49EAF; Sun, 12 Jul 2015 08:47:13 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [192.168.0.7] (cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61]) (authenticated bits=0) by theravensnest.org (8.15.1/8.15.1) with ESMTPSA id t6C8l3vR019440 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 12 Jul 2015 08:47:05 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61] claimed to be [192.168.0.7] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r285404 - head/sys/compat/cloudabi From: David Chisnall In-Reply-To: <20150711205611.GC2404@kib.kiev.ua> Date: Sun, 12 Jul 2015 09:47:26 +0100 Cc: Ed Schouten , Ed Schouten , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <6DE293FA-EE2B-4614-A4FF-E680F976FFB6@FreeBSD.org> References: <201507111941.t6BJfV1a072539@repo.freebsd.org> <20150711194732.GB2404@kib.kiev.ua> <20150711205611.GC2404@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2015 08:47:14 -0000 On 11 Jul 2015, at 21:56, Konstantin Belousov = wrote: >=20 >> Bucket 2: The system call could also just fail and return an error >> (MSG_NOSIGPIPE). > SIGPIPE exists to ensure that naive programs do something reasonable > when their stdout suddenly goes away. Or, transposing the PoV, it = allows > to write useful and well-behaving programs while ignoring = complications. > If all programs must be aware of the special error code from write = which > indicates that nobody listens to the output anymore, it would cause > unneeded code copy/pasted all over the src. Presumably this could be handled in userspace in the system call = wrappers if someone wanted to do it that way - the syscall wrapper would = check for the error condition and call the system call handler (though = if you wanted the mcontext to be meaningful for the syscall return or = support separate signal stacks then this would be fairly complex). David