Re: read() builtin doesn't read integer value /proc files (but bash's does)

2010-11-28 Thread Herbert Xu
On Sat, Sep 04, 2010 at 07:35:04PM +, Jilles Tjoelker wrote: > > > I attached an updated patch that corrects this pb by discarding the > > buffer when opening a new file. > > This discarding is still bad as it throws away valid data if the open > file description is shared. This happens if st

Re: trap bug in recent versions of dash

2010-11-28 Thread Guido Berhoerster
* Herbert Xu [2010-11-28 08:55]: > On Wed, Aug 11, 2010 at 08:06:16AM +, Guido Berhoerster wrote: > > Hello, > > > > with the latest git version of dash trap actions are not > > evaluated in the context of a function. > > > > The following script demonstrates the bug: > > 8< > > read

Re: [PATCH] [MAN] Document optional open parenthesis for case patterns.

2010-11-28 Thread Herbert Xu
On Wed, Sep 08, 2010 at 02:42:19AM +, Philipp Weis wrote: > Hi, > > while inspecting some dash scripts on my system, I was surprised to > see that some of them use an open parenthesis at the beginning of case > patterns while that's not mentioned in the manpage. Dash currently is > fine with a

Re: [PATCH] [OPTIONS] Use exit status 127 when the script to run does not exist

2010-11-28 Thread Herbert Xu
On Wed, Oct 06, 2010 at 05:04:20AM -0500, Jonathan Nieder wrote: > > Herbert Xu wrote: > > > This is wrong. You're creating exactly the problem that Jilles > > was talking about where dot(1) is returning 127. This code should > > be moved to procargs, which runs only for the "sh script" case. >

Re: [PATCH] [OPTIONS] Use exit status 127 when the script to run does not exist

2010-11-28 Thread Herbert Xu
On Sun, Nov 28, 2010 at 08:06:27PM +0800, Herbert Xu wrote: > > However, instead of adding an ad-hoc exception for EXFILE, I'm > simply going to move the exit status setting for EXERROR out of > main.c and into error.c which should let you get what you want. Something like this: commit a42317f102

Re: [PATCH] [OPTIONS] Use exit status 127 when the script to run does not exist

2010-11-28 Thread Herbert Xu
On Sun, Nov 28, 2010 at 08:24:37PM +0800, Herbert Xu wrote: > On Sun, Nov 28, 2010 at 08:06:27PM +0800, Herbert Xu wrote: > > > > However, instead of adding an ad-hoc exception for EXFILE, I'm > > simply going to move the exit status setting for EXERROR out of > > main.c and into error.c which shou

Re: [PATCH 2/3] Revert "Eliminated global exerrno."

2010-11-28 Thread Herbert Xu
On Wed, Oct 06, 2010 at 10:35:18PM -0500, Jonathan Nieder wrote: > > Maybe the following would make sense on top? > > -- 8< -- > Subject: [EXCEPTIONS] Use EXEXIT in place of EXEXEC Patch applied. Thanks a lot! -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http:/

Re: [PATCH v2] [EXCEPTIONS] Stop documenting EXSHELLPROC

2010-11-28 Thread Herbert Xu
On Wed, Oct 06, 2010 at 10:39:23PM -0500, Jonathan Nieder wrote: > At some point between ash 0.3.5-11.0.1 and ash 0.3.8-37, Debian > ash stopped using the EXSHELLPROC exception to handle shell > scripts without a magic number. > > Remove all remaining references to it to avoid confusion. > > Sign

Re: [PATCH] fix two compile time warnings

2010-11-28 Thread Herbert Xu
On Wed, Oct 20, 2010 at 02:59:35AM -0700, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > jobs.c: In function 'sprint_status': > jobs.c:427: warning: format not a string literal and no format arguments > > trap.c: In function 'exitshell': > trap.c:354: warning: variable 'status' might

Re: [Partial patch] IFS and read builtin

2010-11-28 Thread Herbert Xu
On Sun, Nov 07, 2010 at 04:04:20PM -0600, Jonathan Nieder wrote: > > Another puzzle bisecting to f42e443bb. This one comes from the > grub-mkconfig script: > > $ sh -c 'datadir=/usr/share; pkgdatadir=${datadir}/`cat`' 2>&1 | cat -A > cat: M-^\^M^F^HM-4^M^F^HM-(^M^F^H: No such file or directory$

Re: [PATCH] fix two compile time warnings

2010-11-28 Thread Maciej Żenczykowski
> Thanks for the patch.  I've applied the second hunk. > > As for the first, if I get annoyed enough after upgrading my gcc > then I'll think about it :) It's a false positive as strsignal > should never return anything that requires "%s". That's unfortunate since it prevents a -Werror build of kl

Re: [PATCH] fix two compile time warnings

2010-11-28 Thread Herbert Xu
On Sun, Nov 28, 2010 at 11:18:45PM -0800, Maciej Żenczykowski wrote: > > Thanks for the patch.  I've applied the second hunk. > > > > As for the first, if I get annoyed enough after upgrading my gcc > > then I'll think about it :) It's a false positive as strsignal > > should never return anything