Bug#759230: shell: Always use explicit large file API

2020-05-09 Thread Jilles Tjoelker
interfaces selectively, so that the binary could be a bit smaller by avoiding 64-bit numbers where they were not necessary. Now that the feature "supports files with inode numbers that do not fit in 32 bits" is considered essential, this complexity seems unnecessary. I'm sorry for not providing a patch. -- Jilles Tjoelker

Bug#953421: dash: Resident Set Size growth is unbound (memory leak) on an infinite shell loop

2020-03-29 Thread Jilles Tjoelker
l's job table, by launching > it from a subshell: > while true > do > (true &) > sleep .1 > done Certainly a good idea. Another option may be to include regular invocations of the wait utility without parameters, although this is not suitable for all scripts. -- Jilles Tjoelker

Bug#788979: dash: "Argument list too long" error on not too long argument

2015-08-15 Thread Jilles Tjoelker
On Sat, Aug 15, 2015 at 02:13:22AM +0200, Vincent Lefevre wrote: > On 2015-08-14 20:16:27 +0200, Jilles Tjoelker wrote: > > This is not a bug in dash but either in the Linux kernel or in glibc. > > The existence of MAX_ARG_STRLEN (see execve(2)) could be considered a > > bug,

Bug#759230: dash: glob fails on large volume (64bit inodes) with i386 binary.

2014-09-28 Thread Jilles Tjoelker
ir() are always wrong because of 64-bit inode numbers. Therefore, the only correct use of non-largefile APIs are the opens of scripts, /dev/tty and /dev/null (and maybe not even the latter, if /dev/null has a file offset). Is it still worth the complexity to use largefile only selectively? -- Jill

Bug#753674: [dash] dash aborts a script, when 'shift' tested by 'while' fails

2014-09-28 Thread Jilles Tjoelker
;shift' returns the value shifted out but the shell's 'shift' does not return that. It looks more normal to write code like: ] while [ "$#" -gt 0 ]; do ] echo $1 ] shift ] done or ] for arg do ] echo $arg ] done and then there is no iss

Bug#755446: dash: Should pass SA_RESTART to sigaction

2014-09-28 Thread Jilles Tjoelker
om that, my FreeBSD/Linux-centric view says that opening /dev/null should not fail with [EINTR], just like a read or write from/to a regular file on a "normal" filesystem (an intr NFS mount is not normal). -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bugs-dist

Bug#745653: dash does not squash // to / when doing `cd //`

2014-05-17 Thread Jilles Tjoelker
use cd's -P option to force resolution of symlinks; this will also resolve // down to / if they are equivalent. -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Bug#746186: dash: Using wildcard in redirect doesn't work

2014-05-17 Thread Jilles Tjoelker
hnames in redirections; an interactive shell may, provided exactly one pathname results. Dash chooses the simplest thing that can be compliant here: it never generates pathnames in redirections. You can see the same behaviour in scripts with bash --posix or ksh93. -- Jilles Tjoelker -- To UN

Bug#733852: dash: spurious "> " output after Ctrl-V Ctrl-J

2014-03-01 Thread Jilles Tjoelker
ot be worth it. It would be better to enable libedit or to use a version of linenoise (link it statically to avoid the impact on fork() performance). By the way, you can also have a "spurious" "$ ": $ echo a^Jecho b a $ b $ -- Jilles Tjoelker -- To UNSUBSCRIBE, ema

Bug#726735: dash: redirect stdin from stdin to override asynchronous list redirection fails

2013-12-08 Thread Jilles Tjoelker
Hi Serge, ltns, In Debian bug #726735, you wrote: > Dash redirects stdin from /dev/null when a command is started > asynchronously, as specified by POSIX. However, POSIX also specifies > that this can be overridden by explicitely redirecting. This fails > when redirecting stdin from stdin. > The

Bug#716789: Bug #716789: dash: sometimes misbehaves when backticks are included after an || operator

2013-07-20 Thread Jilles Tjoelker
In Debian bug #716789, you wrote: > [cat <

Bug#713805: Bug #713805: dash: does not pass/recognize parameters to/in sourced script

2013-06-22 Thread Jilles Tjoelker
not empty) as the positional parameters. You can set the positional parameters using 'set -- ' before sourcing the script, or you can create a function that sources the script and gets passed the desired parameters. -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-b

Bug#700232: Bug #700232: dash: Segmentation fault in here-document and syntax error

2013-03-10 Thread Jilles Tjoelker
In bug #700232, you wrote: > dash -c ': <

Bug#690473: Bug #690473: dash: No diagnostic on echo builtin failure

2013-02-27 Thread Jilles Tjoelker
either. -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Bug#589103: lsof on kFreeBSD

2012-05-27 Thread Jilles Tjoelker
r to lsof. (In 8.x and earlier, fstat needs kmem access but not in 9.0 and later.) As with the move on Linux from kmem to /proc many years ago, some very specialized information may have to be given up, but that's worth it. -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bugs-dist-re

Bug#651446: dash builtin read has no -s option for silent

2011-12-18 Thread Jilles Tjoelker
or similar happens. -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Bug#590920: dash does not support multi-digit file descriptors

2011-11-01 Thread Jilles Tjoelker
> [possibly allowing fd>9 in redirections] Removing the limit of 10 file descriptors accessible to redirections is not as easy as it seems. An easy change is to raise the limit from 10 to, say, 24, like mksh has done. Although this allows access to more file descriptors, it also increases the 'ul

Bug#642922: regression: "sh -c" change causes FTBFS

2011-10-09 Thread Jilles Tjoelker
p; } | { cat; echo EOF; } varies per shell, and I do not see a reason why this should keep the pipe file descriptor open while shells clearly agree that it should not be kept open in the first example. (Note that I write /bin/sleep explicitly, because some shells have a sleep builtin.) -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Bug#619725: dash: permit special builtin names as function names

2011-04-03 Thread Jilles Tjoelker
alcommand() for 'local' (if (spclbltin > 0 || argc == 0)), or * modifying localcmd() so only local variables are only added to localvars lists belonging to functions. Although I have not tried, the former looks easiest. -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-b

Bug#595063: read() builtin doesnt read integer value /proc files (but bashs does)

2010-12-18 Thread Jilles Tjoelker
On Wed, Dec 15, 2010 at 12:55:51PM -0600, Jonathan Nieder wrote: > Cristian Ionescu-Idbohrn wrote: > > On Sun, 28 Nov 2010, Herbert Xu wrote: > > > On Sat, Sep 04, 2010 at 07:35:04PM +0000, Jilles Tjoelker wrote: > >>> This discarding is still bad as it thro

Bug#436466: dash: Please optimise single command given to -c to exec it

2010-12-07 Thread Jilles Tjoelker
made the change for FreeBSD 8.0 sh, which is very similar to dash. The SVN changeset is r194128. The change appears to work for dash as well. -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Bug#591321: error: "value too great for base" while comparing numbers more than 7 with leading zeros

2010-11-07 Thread Jilles Tjoelker
says where octal numbers shall and shall not be recognized and software generally complies to that. -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Bug#566641: bash: wait $pid exits before $pid has terminated

2010-11-07 Thread Jilles Tjoelker
This looks rather similar to #566639 and can be closed for the same reason. The behaviour is as specified by POSIX and does not seem broken to me. -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Troubl

Bug#482194: bash: PS1 non-empty for non-interactive shells

2010-11-05 Thread Jilles Tjoelker
g the check. The correct way to detect interactive vs non-interactive shells is to check if $- contains "i", for example: case $- in *i*) echo I am interactive ;; *) echo I am not interactive ;; esac -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@l

Bug#598239: dash local assignment splits words

2010-10-03 Thread Jilles Tjoelker
export PATH=foo:~/bin:bar I agree with the other post that POSIX does not require this behaviour, and might even prohibit it; the prohibition is probably not intended, though, and it seems unlikely to me the standard will be changed to prohibit it -- that would break more than it fixes. -- Jil

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

2010-09-04 Thread Jilles Tjoelker
On Sat, Sep 04, 2010 at 08:20:33PM +0200, Steve Schnepp wrote: > 2010/9/3 Jilles Tjoelker : > > This patch assumes that the file descriptor is discarded afterwards (its > > position does not matter). Therefore the very common construct > >  while read x; do > >    ...

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

2010-09-03 Thread Jilles Tjoelker
very common construct while read x; do ... done stops working. A possible fix is to check first if the input supports seeking. If it does, use the buffering and at the end of the line seek backwards for the number of bytes remaining in the buffer. If it does not, read one byte at a time. -- Jil

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

2010-09-02 Thread Jilles Tjoelker
way to read these files needs to be documented, and clear violations that will not work properly should cause an error (in this case, this means that reading one byte from offset 0 should fail like reading one byte from offset 1 does). -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bu

Bug#593426: zsh: Status of background jobs not updated

2010-08-19 Thread Jilles Tjoelker
TINUED for SIGCHLD and the WCONTINUED flag and WIFCONTINUED() macro for waitpid(). Some systems do not provide these, and may not even provide queuing and siginfo for SIGCHLD, so the latter approach seems best. The WCONTINUED stuff can then be #ifdef'ed out for systems that do not support it.

Bug#587741: dash: shell functions seem to make per-command variable assignments permanent

2010-07-07 Thread Jilles Tjoelker
pt that some of them affect the shell environment in a way only a builtin can). There is less historical basis for the treatment of assignments on function calls, as such assignments had no effect whatsoever in the original Bourne shell. -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-

Bug#566639: dash: wait $pid exits before $pid has terminated

2010-06-05 Thread Jilles Tjoelker
ocess group in XBD 3 Definitions.) Concludingly, there is no bug here. All the behaviour is as described in POSIX. -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Bug#570757: dash: cannot parse multiline parameter expansion

2010-05-30 Thread Jilles Tjoelker
have not received any other complaints about this. The System V shell (e.g. /bin/sh on Solaris <= 10) behaves similarly. -- Jilles Tjoelker -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org