2020-02-01 10:47:46 +, Stephane Chazelas:
[...]
> That doesn't explain why it's different with ${0+type} or when
> there's more than the one invocation of "type" in the script.
[...]
OK, I see what's going on.
It looks like it's caused by an "optimisation" in its
libc:exec*(), so /usr/xpg4/bi
2020-01-31 21:26:33 +, Stephane Chazelas:
[...]
> You might have been mislead by Solaris' /usr/xpg4/bin/sh
>
> On Solaris 11,
>
> $ /usr/xpg4/bin/sh -c 'type printf'
> printf is a shell builtin
>
> But
>
> $ truss -ft execve /usr/xpg4/bin/sh -c 'printf "x"'
> 1382: execve("/usr/xpg4/bin/s