| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Also, don't pass the address of errno itself to write(), since write()
is allowed to modify it.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
From looking at the Linux exec() implementation, it seems a big part of
the reason we needed extra headroom was that the arguments/environment
are copied page-by-page, so even a small accounting difference could
result in an error of an entire page size. Grow the headroom to two
entire pages to account for this.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I ran into "argument list too long" errors with a
bfs -type f -exec grep pattern '{}' +
command, despite the current accounting being pretty careful. Some
experimentation showed that an additional 2048 bytes of headroom is
always safe.
While we're at it, explicitly account for the terminating NULL pointers
in argv and environ.
|
| |
|
|
|
|
| |
-ok should look for a ; even if it sees {} +, according to POSIX.
|
|
|
|
|
|
|
|
|
| |
POSIX explicitly forbids this extension:
> Only a <plus-sign> that immediately follows an argument containing
> only the two characters "{}" shall punctuate the end of the primary
> expression. Other uses of the <plus-sign> shall not be treated as
> special.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This fixes strange "Inappropriate ioctl for device" errors when using
-exec ... + with output redirection. errno was set to ENOTTY by the
isatty() call during startup for color auto-detection, and never cleared
before eval_exec() wants to check if anything went wrong.
|
| |
|
| |
|
|
|
|
| |
Thanks to https://www.in-ulm.de/~mascheck/various/argmax/
|
| |
|
|
|