Package: dash
Version: 0.5.4-12
Severity: normal

Hopefully the following will illustrate some unexpected behaviour I
discovered:

   mich...@cnspc18:~$ dash -c 'noop(){ true;}; x=1; noop; x=broken true; echo 
"x is now $x"'
   x is now 1
   mich...@cnspc18:~$ dash -c 'noop(){ true;}; x=1; noop; x=broken noop; echo 
"x is now $x"'
   x is now broken

My understanding is that 'x=broken noop' shouldn't make the change to x
permanent. It shouldn't make a different whether the command is a normal
executable versus a shell function, right? o_O

-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable'), (490, 'testing'), (470, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dash depends on:
ii  libc6                         2.11.1-3   Embedded GNU C Library: Shared lib

dash recommends no packages.

dash suggests no packages.

-- debconf information excluded

-MD

-- 
-------------------------------------------------------------------------------
Michael Deegan                Hugaholic                http://www.deegan.id.au/
--------------------- Guvax bs vg nf ribyhgvba va npgvba. ---------------------



-- 
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