On 2023-12-21 13:46, Alan Coopersmith wrote:
On Solaris 11.4, /bin/sh is currently a somewhat modified ksh93u+ -
we're working to resync with the new community upstream still.

In that shell, when I run:
   printf "test" </dev/null >/dev/full
it prints nothing and $? is set to 0.

This appears to be a regression from Solaris 10 and Solaris 11.3. Although they lack /dev/full they do have other ways for printf to fail, e.g.:

  ulimit -f 0
  trap "" XFSZ
  printf "test" >test || echo failed with status $?

which issues the following diagnostics on Solaris 10 /bin/sh:

  printf: write error: File too large
  failed with status 1

and the following on Solaris 11.3 /bin/sh:

  /bin/sh[3]: printf: write to 1 failed [File too large]
  failed with status 1

but I guess quietly succeeds on Solaris 11.4 (I lack easy access to a Solaris 11.4 box).

Reply via email to