Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | exec: Don't assume bfs_exec_debug() doesn't change errno | Tavian Barnes | 2018-06-25 | 1 | -4/+3 |
| | |||||
* | exec: Fix size accounting when recovering from E2BIG | Tavian Barnes | 2018-02-10 | 1 | -4/+6 |
| | |||||
* | exec: Avoid a warning when building with _FORTIFY_SOURCE | Tavian Barnes | 2018-02-06 | 1 | -1/+6 |
| | | | | | Also, don't pass the address of errno itself to write(), since write() is allowed to modify it. | ||||
* | exec: Minor whitespace consistency fix | Tavian Barnes | 2017-11-13 | 1 | -1/+1 |
| | |||||
* | exec: Recover from E2BIG | Tavian Barnes | 2017-11-12 | 1 | -18/+77 |
| | |||||
* | exec: Make argument size tracking robust to page-granularity accounting | Tavian Barnes | 2017-10-26 | 1 | -3/+8 |
| | | | | | | | | 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. | ||||
* | exec: Apply more headroom to avoid E2BIG | Tavian Barnes | 2017-10-22 | 1 | -4/+16 |
| | | | | | | | | | | | | | 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. | ||||
* | opt: Separate optimization from parsing | Tavian Barnes | 2017-09-16 | 1 | -1/+1 |
| | |||||
* | exec: Fix more corner cases with -ok ... + | Tavian Barnes | 2017-07-29 | 1 | -9/+10 |
| | | | | -ok should look for a ; even if it sees {} +, according to POSIX. | ||||
* | exec: Don't allow anything between {} and + | Tavian Barnes | 2017-07-29 | 1 | -75/+30 |
| | | | | | | | | | 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. | ||||
* | util: Define O_DIRECTORY to 0 if it's not already defined | Tavian Barnes | 2017-07-29 | 1 | -5/+1 |
| | |||||
* | Re-license under the BSD Zero Clause License | Tavian Barnes | 2017-07-27 | 1 | -10/+15 |
| | |||||
* | Handle yes/no prompts correctly according to the locale | Tavian Barnes | 2017-07-15 | 1 | -7/+1 |
| | |||||
* | exec: Clear errno when a multi-exec doesn't fail | Tavian Barnes | 2017-07-08 | 1 | -1/+6 |
| | | | | | | | 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. | ||||
* | Implement -D exec | Tavian Barnes | 2017-05-09 | 1 | -5/+44 |
| | |||||
* | exec: Treat -1 from _SC_ARG_MAX as "unlimited" | Tavian Barnes | 2017-04-30 | 1 | -1/+1 |
| | |||||
* | exec: Interpret ARG_MAX corretly. | Tavian Barnes | 2017-04-15 | 1 | -33/+111 |
| | | | | Thanks to https://www.in-ulm.de/~mascheck/various/argmax/ | ||||
* | exec: close() the working directory even if !ftwbuf | Tavian Barnes | 2017-04-15 | 1 | -1/+1 |
| | |||||
* | Implement -exec/-execdir ... + | Tavian Barnes | 2017-04-15 | 1 | -0/+456 |