forcemerge 436466 604993 
tags 436466 + upstream
quit

Tim Connors wrote:

> 75428,46> /bin/bash -c "bash -c \"echo \\\$PPID ; ps \\\$PPID\""

Ah, I get it now.  This is Bug #436466 (dash: Please optimise single
command given to -c to exec it).

It falls cleanly into the "patches welcome" category[1].

> It causes the PPid line in /proc/$pid/status to be WRONG for any program
> or script if it was executed by the system() routine provided in libc

Survey of existing behavior:

        $ for shell in dash ksh93 bash mksh pdksh
        > do
        >       $shell -c 'printf "%s " $$; bash -c "echo \$\$"'
        > done
        18832 18833
        18834 18834
        18835 18836
        18837 18838
        18839 18841
        $ for shell in dash ksh93 bash mksh pdksh
        > do
        >       $shell -c 'bash -c "readlink /proc/\$PPID/exe"'
        > done
        /bin/dash
        /bin/bash
        /bin/bash
        /bin/mksh
        /bin/pdksh

POSIX and tradition do not require the bash/ksh behavior.  (See
http://austingroupbugs.net/ if you would like to change that.)

Have you tried "dpkg-reconfigure -plow dash"?  That should allow your
apps to continue working...

Regards,
Jonathan

[1] If you'd like to work on this, that would be excellent.  Please
feel free to email d...@vger.kernel.org with any work in progress.  No
subscription required, since the convention is to always cc all
participants.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to