Re: rc of built-in printf

2022-03-16 Thread David Holland
On Wed, Mar 16, 2022 at 07:00:12AM +0700, Robert Elz wrote: > This issue was brought up on the austin-group list (POSIX) by > some doing testing in linux, with output from commands being sent > to /dev/full (yes, a special file whose only purpose, as far as > I can tell, is to return ENOSPC to

Re: rc of built-in printf

2022-03-15 Thread Robert Elz
Date:Tue, 15 Mar 2022 18:57:08 +0100 From:Edgar =?iso-8859-1?B?RnXf?= Message-ID: | Is it on purpose that sh's (at least, NetBSD-8's sh's) | built-in printf doesn't give a non-zero rc if the underlying | write(2) fails (with EPIPE, in my case)? On purpose? N

Re: rc of built-in printf

2022-03-15 Thread Edgar Fuß
Oops, it looks like /usr/bin/printf will only exit non-zero because it receives SIGPIPE. If called with SIGPIPE ignored, it will still exit 0.