aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/exec.cpp
Commit message (Collapse)AuthorAge
* Make IWYU output in lint.cpp less messyGravatar Aaron Gyes2016-06-23
| | | | And re-run IWYU, adjust #includes.
* Repair various invalid HeaderDoc comments.Gravatar Aaron Gyes2016-06-05
| | | | | Enable build setting to allow Xcode to complain about invalid comments.
* fix building on CygwinGravatar Kurtis Rader2016-05-19
| | | | | | | Cygwin still doesn't support any of the backtrace functions. Also, remove a spurious newline from a debug message. Fixes #2993
* make debug() output more usefulGravatar Kurtis Rader2016-05-17
| | | | | | | | | | This change does several things. First, and most important, it allows dumping the "n" most recent stack frames on each debug() call. Second, it demangles the C++ symbols. Third, it prepends each debug() message with the debug level. Unrelated to the above I've replaced all `assert(!is_forked_child());` statements with `ASSERT_IS_NOT_FORKED_CHILD()` for consistency.
* add `function --shadow-builtin` flagGravatar Kurtis Rader2016-05-14
| | | | | | | | | | | | | | It's currently too easy for someone to bork their shell by doing something like `function test; return 0; end`. That's obviously a silly, contrived, example but the point is that novice users who learn about functions are prone to do something like that without realizing it will bork the shell. Even expert users who know about the `test` builtin might forget that, say, `pwd` is a builtin. This change adds a `--shadow-builtin` flag that must be specified to indicate you know what you're doing. Fixes #3000
* fix fork debug printf() callsGravatar Kurtis Rader2016-05-05
| | | | | | | | The fork (create new process) related debugging messages rely on an undocumented env var and use `printf()` rather than `debug()`. There are also errors in how the fork count is tracked that this fixes. Fixes #2995
* lint cleanup: eliminate "redundant" errorsGravatar Kurtis Rader2016-05-04
| | | | | This removes some pointless parentheses but the primary focus is removing redundancies like unnecessary "else" clauses.
* restyle switch blocks to match project styleGravatar Kurtis Rader2016-05-03
| | | | | | | | | | | | | | | I missed restyling a few "switch" blocks to make them consistent with the rest of the code base. This fixes that oversight. This should be the final step in restyling the C++ code to have a consistent style. This also includes a few trivial cleanups elsewhere. I also missed restyling the "complete" module when working my way from a to z so this final change includes restyling that module. Total lint errors decreased 36%. Cppcheck errors went from 47 to 24. Oclint P2 errors went from 819 to 778. Oclint P3 errors went from 3252 to 1842. Resolves #2902.
* restyle exec module to match project styleGravatar Kurtis Rader2016-04-28
| | | | | | Reduces lint errors from 121 to 59 (-51%). Line count from 1578 to 1290 (-18%). Another step in resolving issue #2902.
* add better support for IWYU and fix thingsGravatar Kurtis Rader2016-04-26
| | | | | | | | | Remove the "make iwyu" build target. Move the functionality into the recently introduced lint.fish script. Fix a lot, but not all, of the include-what-you-use errors. Specifically, it fixes all of the IWYU errors on my OS X server but only removes some of them on my Ubuntu 14.04 server. Fixes #2957
* Work around some bogus static analyzer warningsGravatar ridiculousfish2016-02-02
|
* restore the terminal modes before an "exec"Gravatar Kurtis Rader2015-12-15
| | | | | | | | | When replacing the existing fish process with a new process it is important to restore the temrinal modes to what they were when fish started running. We don't want any tweaks done for the benefit of fish (e.g., disabling ICRNL mode) to bleed thru to an "exec"ed command. Resolves #2609
* Don't complain if do_builtin_io fails due to EPIPEGravatar Andy Lutomirski2015-12-10
| | | | | | | If stdio is dead due to EPIPE, there's no great reason to spew a stack dump. This will still write an error to stderr if stdout dies. This might be undesirable, but changing that should be considered separately.
* Only include <spawn.h> if HAVE_SPAWN_HGravatar Fredrik Fornwall2015-10-02
| | | | | | | This fixes building on platforms such as Android which lacks <spawn.h>. Signed-off-by: David Adam <zanchey@ucc.gu.uwa.edu.au>
* Teach builtin_string to recognize redirections, not just pipesGravatar ridiculousfish2015-09-25
| | | | | Allows cases like `string split \n < file.txt` to work. Fixes 2422
* Eliminate global variables associated with builtin IOGravatar ridiculousfish2015-09-22
| | | | | | | This change eliminates global variables like stdout_buffer. Instead we wrap up the IO information into a new struct io_streams_t, and thread that through every builtin. This makes the intent clearer, gives us a place to hang new IO data, and eliminates the ugly global state management like builtin_push_io.
* Factor function environment preparation into its own functionGravatar ridiculousfish2015-08-15
|
* Merge branch 'master' into iwyuGravatar David Adam2015-07-26
|
* Migrate source files into src/ directoryGravatar ridiculousfish2015-07-24
This change moves source files into a src/ directory, and puts object files into an obj/ directory. The Makefile and xcode project are updated accordingly. Fixes #1866