[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: portability note about 'printf'
From: |
Bruno Haible |
Subject: |
Re: portability note about 'printf' |
Date: |
Fri, 27 Apr 2007 01:08:32 +0200 |
User-agent: |
KMail/1.5.4 |
Paul Eggert wrote:
> +Large outputs may cause trouble. On Solaris 8 through 10, for example,
> +the command @samp{/bin/printf %010000x 123} dumps core.
This holds also for Solaris 2.5.1 to Solaris 10.
> This particular
> +bug should have little practical effect since Solaris shells' builtin
> address@hidden commands do not have the bug
I don't agree with this. The normal shell, used for commands inside Makefiles
and for shell scripts, is /bin/sh, and /bin/sh in Solaris 8 through 10
does not have 'printf' built-in. If you don't see the bug in Solaris, my
guess is that either you have a symlink /bin/sh -> /bin/bash, or you have
the coreutils 'printf' in your PATH in front of /usr/bin and /bin. The bug was
reported to me precisely because a normal user encountered it in a shell
script.
Bruno