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
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
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,
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
;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
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
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
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
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
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
In Debian bug #716789, you wrote:
> [cat <
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
In bug #700232, you wrote:
> dash -c ': <
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
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
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
> [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
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
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
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
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
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
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
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
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
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
> > ...
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
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
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.
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-
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
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
32 matches
Mail list logo