aboutsummaryrefslogtreecommitdiffhomepage
path: root/proc.cpp
Commit message (Collapse)AuthorAge
* Allow fish to properly exit from job_continue when receiving a signalGravatar ridiculousfish2015-02-27
| | | | | | | | | | e340baf6cc introduced a bug where fish would not exit from job_continue when receiving a signal like SIGHUP. This means that it would not in turn deliver SIGHUP to its children, who would therefore never exit. Those children may attempt to write to stdout, in which case they would receive EIO; this can cause other weird issues, like telnet using 100% CPU. Fixes #1958
* Reap jobs before calling select() in job_continue()Gravatar Kevin Ballard2015-01-12
| | | | | | | | | | Prior to b0e09303a, simple jobs like `printf "%s\n" $line | read word _` never hit the call to select() because they were reaped in the SIGCHLD signal handler. With that commit, the signal handler no longer reaps children, and a job like that would enter select() and hit the 10000μs timeout before discovering that the job was already complete. Fixes #1884.
* Remove useless signal-checking loop in job_continueGravatar ridiculousfish2014-12-29
| | | | This loop has always been nonsense.
* use configure to define NOMACROSGravatar David Adam2014-12-21
| | | | (added in 9ec808a4c)
* Solaris build fixes: pick the right curses more of the timeGravatar David Adam2014-12-21
|
* Remove an incorrect commentGravatar ridiculousfish2014-11-03
|
* Clean up some job status messagesGravatar ridiculousfish2014-11-03
| | | | | | | Stop printing anything for jobs terminated via ^C. Don't list the job number if it's the only job. Fixes #1119
* Reintroduce "Stop reaping children from SIGCHLD handler"Gravatar ridiculousfish2014-10-25
| | | | | This re-introduces 3fe10692199fc20a5f4b6ac5057cce43babc5f36 with some associated fixes to address #1768.
* Revert "Stop reaping children from SIGCHLD signal handler"Gravatar ridiculousfish2014-10-21
| | | | | | This reverts commit 3fe10692199fc20a5f4b6ac5057cce43babc5f36. In light of #1768
* Revert "Remove some previously buggy but dead code that I mistakenly ↵Gravatar ridiculousfish2014-10-21
| | | | | | resurrected" This reverts commit 090f027de179f5bb92f07e5c947f3f273229d840.
* Remove some previously buggy but dead code that I mistakenly resurrectedGravatar ridiculousfish2014-10-20
|
* Stop reaping children from SIGCHLD signal handlerGravatar ridiculousfish2014-10-20
| | | | | | | | | | | | | | | | | | | | | | Prior to this fix, a child process may be reaped in one of two ways: 1. By a call to waitpid() within job_continue 2. By a call to waitpid() within the SIGCHLD signal handler Only the second call was with the WNOHANG option. Thus if the signal handler fired first, and then the waitpid call fired, we could get a deadlock because we'd end up waiting on a long-running process. I have not been able to reproduce this on fish 1.x, though it seems like it ought to reproduce there too. This fix migrates the waitpid() call out of the signal handler; the second class of calls moves to job_reap. This eliminates the possibility of a race, because we check for job completion before calling waitpid, and there is no longer the possibility of the job being marked as complete asynchronously. It also results in a massive conceptual simplification, since the signal handler is now very simple and easy to reason about (no more walking jobs lists, etc). This partially fixes a bug reported in #1273
* Don't sanity_lose if INTERNAL_BLOCK_NODEs have a null argvGravatar ridiculousfish2014-07-12
| | | | Fixes #1545
* Squelch some more warnings on LinuxGravatar ridiculousfish2014-04-27
|
* Attempt to silence some warningsGravatar ridiculousfish2014-04-27
|
* Fix filehandle leak in proc_get_jiffiesGravatar Konrad Borowski2014-04-26
|
* Update style and formatting to conform to fish style guide.Gravatar ridiculousfish2014-01-15
|
* Support for Ctrl-C cancellation in new parser. Added tests for it too.Gravatar ridiculousfish2014-01-02
|
* Support for stack overflow and infinite recursion detection in newGravatar ridiculousfish2014-01-01
| | | | parser
* Clean up and rationalize error handling in parse_execution.cppGravatar ridiculousfish2013-12-31
|
* New ideas about how to use new parser for execution. Beginnings ofGravatar ridiculousfish2013-12-26
| | | | implementation.
* Initial flailing around trying to adopt new parser for actual executionGravatar ridiculousfish2013-12-20
|
* Allow autosuggestions to do job expansion. FixesGravatar ridiculousfish2013-11-29
| | | | https://github.com/fish-shell/fish-shell/issues/1152
* Big fat refactoring of how redirections work. In fish 1.x and 2.0.0, the ↵Gravatar ridiculousfish2013-08-19
| | | | | | | | | | redirections for a process were flattened into a big list associated with the job, so there was no way to tell which redirections applied to each process. Each process therefore got all the redirections associated with the job. See https://github.com/fish-shell/fish-shell/issues/877 for how this could manifest. With this change, jobs only track their block-level redirections. Process level redirections are correctly associated with the process, and at exec time we stitch them together (block, pipe, and process redirects). This fixes the weird issues where redirects bleed across pipelines (like #877), and also allows us to play with the order in which redirections are applied, since the final list is constructed right before it's needed. This lets us put pipes after block level redirections but before process level redirections, so that a 2>&1-type redirection gets picked up after the pipe, i.e. it should fix https://github.com/fish-shell/fish-shell/issues/110 This is a significant change. The tests all pass. Cross your fingers.
* Trivial cleanup of a function in proc.cppGravatar ridiculousfish2013-08-19
|
* Initial work towards various IO cleanups with an eye to fixing ↵Gravatar ridiculousfish2013-08-19
| | | | https://github.com/fish-shell/fish-shell/issues/110
* Mark jobs as completed when all processes have finished, not just the last one.Gravatar ridiculousfish2013-06-16
| | | | Fixes https://github.com/fish-shell/fish-shell/issues/876 , and coincidentally also https://github.com/fish-shell/fish-shell/issues/848
* Formatting and style updatesGravatar ridiculousfish2013-05-05
|
* Add thread assertion to proc_set_last_statusGravatar ridiculousfish2013-04-07
|
* Mark stdin as nonblocking if we get EWOULDBLOCK, and before handing it off ↵Gravatar ridiculousfish2013-04-07
| | | | | | to child processes when either starting them or moving them to the foreground. https://github.com/fish-shell/fish-shell/issues/176
* Kill termio.h and sys/termios.hGravatar David Adam (zanchey)2013-03-05
| | | | | | | | | | | On FreeBSD, compilation complains that "this file includes <sys/termios.h> which is deprecated, use <termios.h> instead". On Linux and FreeBSD, <sys/termios.h> literally just pulls in <termios.h>. On OS X and Solaris, <termios.h> pulls in <sys/termios.h>. <termio.h> doesn't exist on FreeBSD or Mac OS X, and on Linux is marked as deprecated and just includes <termios.h>. It does exist on Solaris, but no `struct termio` is ever actually used in the codebase.
* Make subcommands modify $status, and make builtin_set not modify status ↵Gravatar ridiculousfish2013-01-31
| | | | | | | unless it fails https://github.com/fish-shell/fish-shell/issues/547 https://github.com/fish-shell/fish-shell/issues/214
* Attempt to further improve fish's handling when it runs out of fds, and plug ↵Gravatar ridiculousfish2013-01-30
| | | | some fd leaks
* Initial set of changes working to make fish robust against running out of ↵Gravatar ridiculousfish2013-01-30
| | | | file descriptors
* Fix spelling: s/circut/circuit/gGravatar Cheer Xiao2013-01-24
|
* Remove some functions which were rendered trivial by xiaq's changes. Make ↵Gravatar ridiculousfish2013-01-19
| | | | io_file_t take its path directly. Make io_buffer_t no longer use a shared_ptr for its data.
* Split out io_pipe_t, let io_buffer_t inherit itGravatar Cheer Xiao2013-01-17
|
* Split out io_buffer_t, make input_redirect in exec() a raw pointerGravatar Cheer Xiao2013-01-17
|
* Revert "Revert shared_ptr<io_data_t> changes until kinks are ironed out"Gravatar Cheer Xiao2013-01-11
| | | | This reverts commit 77f1b1f0fe27778750bb9b9aa53f6bc42d5e5843.
* Revert shared_ptr<io_data_t> changes until kinks are ironed outGravatar ridiculousfish2013-01-04
| | | | | | | | | | | https://github.com/fish-shell/fish-shell/pull/487 Revert "Merge branch 'oo-io' of git://github.com/xiaq/fish-shell into xiaq-oo-io" This reverts commit f3c8f535a48d5fdd518bd60879ade948bc8be7e6, reversing changes made to b02f6cf3bc4343cf3e068dee3cb46de7139a5a27. Also reverts ac023f7588e562a03fdea7fd2feda487f18827c7 and a79d3c680c9548566309121630dadc94e48934c4
* Use shared_ptr to manage io_data_t*.Gravatar Cheer Xiao2012-12-31
|
* Merge branch 'event-bug-test' of git://github.com/JanKanis/fish-shell into ↵Gravatar ridiculousfish2012-12-22
|\ | | | | | | JanKanis-event-bug-test
| * Make event_t.arguments into a vector instead of an auto_ptr<vector>.Gravatar Jan Kanis2012-12-20
| | | | | | | | Yay for less indirection and less code! The resulting event_t structure is two pointers larger, but cuts out an indirection and allocation.
* | Random fixes to comments.Gravatar Cheer Xiao2012-12-16
|/
* Fix indentation of switch statementsGravatar ridiculousfish2012-11-19
|
* Apply new indentation, brace, and whitespace styleGravatar ridiculousfish2012-11-18
|
* Restore terminal foreground process group on exitGravatar ridiculousfish2012-11-18
| | | | Fixes https://github.com/fish-shell/fish-shell/issues/197
* Removed unused commented out code and fixed some indentationGravatar ridiculousfish2012-11-04
|
* Don't use posix_spawn for commands that need to be put into foreground to ↵Gravatar ridiculousfish2012-11-04
| | | | | | avoid a race Fix for race where a command's output may not be fully drained
* Don't use posix_spawn when file redirections are involved (except /dev/null) ↵Gravatar ridiculousfish2012-10-29
| | | | | | | because the error handling is too difficult Fix exec to correctly handle the case where a pid could not be created due to posix_spawn failing Should fix https://github.com/fish-shell/fish-shell/issues/364