Re: printf cannot write more than one line to /proc/pid/uid_map

2014-03-25 Thread Chris Down
Chet Ramey writes: > `command' is a shell builtin that will run shell builtins. It only skips > shell functions. Huh, I guess I have been using zsh for too long. I forgot that the behaviour in bash/POSIX is not the same. pgpYBta6iEqrR.pgp Description: PGP signature

Re: printf cannot write more than one line to /proc/pid/uid_map

2014-03-25 Thread Chet Ramey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/25/14 4:11 PM, Chris Down wrote: > Pádraig Brady writes: >> If you want to use the external printf to achieve more >> standard buffering modes, you can use `env` like: >> >> env printf '%s' '0 0 1\n1 1 1' > /proc/31861/uid_map > > While this wi

Re: printf cannot write more than one line to /proc/pid/uid_map

2014-03-25 Thread Chris Down
Pádraig Brady writes: > If you want to use the external printf to achieve more > standard buffering modes, you can use `env` like: > > env printf '%s' '0 0 1\n1 1 1' > /proc/31861/uid_map While this will probably work, the more typical way to do this is with command(1P). pgpOycint6nTB.pgp Des

Re: Special built-ins not persisting assignments

2014-03-25 Thread Mike Frysinger
On Tue 25 Mar 2014 00:39:18 Pollock, Wayne wrote: > $ echo $BASH_VERSION > 4.2.45(1)-release > > $ unset foo > > $ foo=bar : > > $ echo $foo > > > $ > > === > > According to POSIX/SUS issue 7, assignments for special builtins > should persist. So the output should be ``bar''. >

Re: printf cannot write more than one line to /proc/pid/uid_map

2014-03-25 Thread Pádraig Brady
On 03/25/2014 01:57 PM, Greg Wooledge wrote: > On Tue, Mar 25, 2014 at 08:24:13PM +0900, Kusanagi Kouichi wrote: >> Description: >> Bash's builtin printf cannot write more than one line to >> /proc/pid/uid_map because printf writes one line at a time >> and uid_map can be written onl

Re: printf cannot write more than one line to /proc/pid/uid_map

2014-03-25 Thread Andreas Schwab
Greg Wooledge writes: > Sounds like Bash is using the standard I/O library routines, in line > buffering mode (i.e. setvbuf(..., _IOLBF, ...); ). See sh_setlinebuf in shell_initialize. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748

Re: printf cannot write more than one line to /proc/pid/uid_map

2014-03-25 Thread Kusanagi Kouichi
On 2014-03-25 08:58:08 -0500, Dennis Williamson wrote: > On Mar 25, 2014 8:40 AM, "Kusanagi Kouichi" wrote: > > > > Configuration Information [Automatically generated, do not change]: > > Machine: x86_64 > > OS: linux-gnu > > Compiler: gcc > > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE=

Re: printf cannot write more than one line to /proc/pid/uid_map

2014-03-25 Thread Greg Wooledge
On Tue, Mar 25, 2014 at 08:24:13PM +0900, Kusanagi Kouichi wrote: > Description: > Bash's builtin printf cannot write more than one line to > /proc/pid/uid_map because printf writes one line at a time > and uid_map can be written only once. Sounds like Bash is using the standard

Re: printf cannot write more than one line to /proc/pid/uid_map

2014-03-25 Thread Eduardo A . Bustamante López
On Tue, Mar 25, 2014 at 08:24:13PM +0900, Kusanagi Kouichi wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x8

printf cannot write more than one line to /proc/pid/uid_map

2014-03-25 Thread Kusanagi Kouichi
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKA