Commit graph

1014 commits

Author SHA1 Message Date
Kurtis Rader
5c0311653e Revert "Raised debug level for "Retrying setpgid" message"
This reverts commit 711c81b8c8.
It was meant for the major branch.
2017-08-13 15:24:44 -07:00
Kurtis Rader
6fe0cb1941 Revert "Split internal_exec to its own function"
This reverts commit 4a1de248bc.
It was meant for the major branch.
2017-08-13 15:24:36 -07:00
Kurtis Rader
03a66e31f4 Revert "Unified all child/parent forking code in exec_job"
This reverts commit 384879704a.
It was meant for the major branch.
2017-08-13 15:24:29 -07:00
Kurtis Rader
5aa281942f Revert "Corrected job_type for external command in debug log"
This reverts commit 4dfb334db8.
It was meant for the major branch.
2017-08-13 15:24:18 -07:00
Kurtis Rader
82ee3d6a4e Revert "Deduplication between INTERNAL_FUNCTION and INTERNAL_BLOCK_NODE"
This reverts commit 0594735714.
It was meant for the major branch.
2017-08-13 15:24:08 -07:00
Kurtis Rader
fea22f2bec Revert "Revert "Revert "finish cleanup of signal blocking code"""
This reverts commit 52d739c746.
It was meant for the major branch.
2017-08-13 15:23:57 -07:00
Kurtis Rader
8aca33b21f Revert "fixes to job control changes"
This reverts commit 083224d1c0.
It was meant for the major branch.
2017-08-13 15:23:44 -07:00
Kurtis Rader
dc5d0ff22f Revert "lint and style cleanups"
This reverts commit acdb81bbca.
It was meant for the major branch.
2017-08-13 15:23:19 -07:00
Kurtis Rader
b0c47c814f Revert "make style-all time again"
This reverts commit 975a5bfbde.
It was meant for the major branch.
2017-08-13 15:22:50 -07:00
Kurtis Rader
5786f9e5c3 Revert "replace var_entry_t with env_var_t"
This reverts commit 1c9370dbd2.
2017-08-13 14:58:00 -07:00
Kurtis Rader
2b7a4143ec Revert "fix bug in env_get() involving empty vars"
This reverts commit 559b05d01d.
It was meant for the major branch.
2017-08-13 14:57:44 -07:00
Kurtis Rader
a2f507f1c8 Revert "remove more ENV_NULL references"
This reverts commit 591449aba7.
It was meant for the major branch.
2017-08-13 14:57:31 -07:00
Kurtis Rader
9f4f9545c1 Revert "change order of env_set() args"
This reverts commit 6e7956a413.
It was meant for the major branch.
2017-08-13 12:48:22 -07:00
Kurtis Rader
59dbf64603 Revert "make missing_var a singleton"
This reverts commit 3df8643c31.
It was meant for the major branch.
2017-08-13 12:48:22 -07:00
Mahmoud Al-Qudsi
fefd1c7991 Silence unused result warnings on newer compilers
Newer versions of GCC and Clang are not satisfied by a cast to void,
this fix is adapted from glibc's solution.

New wrapper function ignore_result should be used when a function with
explicit _unused_attribute_ wrapper is called whose result will not be
handled.
2017-08-12 09:54:26 -05:00
Kurtis Rader
3df8643c31 make missing_var a singleton
Make the `env_var_t::missing_var()` object a singleton rather than a
dynamically constructed object. This requires some discipline in its use
since C++ doesn't directly support immutable objects. But it is slightly
more efficient and helps identify code that incorrectly mutates `env_var_t`
objects that should not be modified.
2017-08-11 15:51:42 -07:00
Kurtis Rader
6e7956a413 change order of env_set() args
It's bugged me forever that the scope is the second arg to `env_get()`
but not `env_set()`. And since I'll be introducing some helper functions
that wrap `env_set()` now is a good time to change the order of its
arguments.
2017-08-11 15:51:42 -07:00
Kurtis Rader
3f999209a5 Merge branch 'master' into major 2017-08-10 17:00:56 -07:00
peoro
7f1bdc5541 Improved warning message when exiting with jobs still active
Fixes #4303
2017-08-10 16:57:14 -07:00
Kurtis Rader
591449aba7 remove more ENV_NULL references 2017-08-10 15:20:53 -07:00
Kurtis Rader
559b05d01d fix bug in env_get() involving empty vars
My previous change to eliminate `class var_entry_t` caused me to notice
that `env_get()` turned a set but empty var into a missing var. Which
is wrong. Fixing that brought to light several other pieces of code that
were wrong as a consequence of the aforementioned bug.

Another step to fixing issue #4200.
2017-08-10 14:43:59 -07:00
Kurtis Rader
1c9370dbd2 replace var_entry_t with env_var_t
This is a step to storing fish vars as actual vectors rather than flat
strings.
2017-08-09 20:47:29 -07:00
Fabian Homborg
d84a859f4f Revert "Fix clearing abandoned line with VTE (#4243)"
Unfortunately, this breaks the expect tests.

So, until I can figure out how to unbreak them:

This reverts commit 09cb31a172.
2017-08-10 02:24:13 +02:00
Fabian Homborg
09cb31a172 Fix clearing abandoned line with VTE (#4243)
* Fix clearing abandoned line with VTE

With VTE-based terminals, resizing currently causes multi-line prompts
to go weird.

This changes the sequence we use to clear the line to one suggested by
a VTE
developer (https://bugzilla.gnome.org/show_bug.cgi?id=763390#c4).

It changes nothing in konsole 17.04.3 and urxvt 9.22, but they already
work.

Note that this does not fix the case where output did not end in a
newline, but that doesn't seem to be up to us. Also, it only affects
those lines.

Fixes #2320.

* Use terminfo definition instead of hardcoding

Thanks to @ixjlyons.
2017-08-10 00:37:32 +02:00
Kurtis Rader
a40d5d4ea6 fix botched merge 2017-08-09 12:30:33 -07:00
Kurtis Rader
29f933adfc Merge branch 'master' into major 2017-08-09 12:26:24 -07:00
David Adam
5d2a806ac6 set: update language of warning message 2017-08-09 14:23:00 +08:00
Kurtis Rader
55bef3cd2e remove deprecated . (dot) command
Fixes #4294
2017-08-07 18:31:20 -07:00
Kurtis Rader
fb7645659f Merge branch 'master' into major 2017-08-06 20:22:31 -07:00
Kurtis Rader
4f5bd08b20 improve set -U warning
Doing `set -U var` when a global named `var` exists can result in
confusing behavior. Try to limit the confusion by improving the warning
we write. Also, only write the warning if interactive.

Fixes #4267
2017-08-06 19:57:25 -07:00
Kurtis Rader
975a5bfbde make style-all time again
Recent changes have introduced some style deviations so clean them up.
2017-08-06 16:05:51 -07:00
Kurtis Rader
acdb81bbca lint and style cleanups 2017-08-06 15:47:01 -07:00
Kurtis Rader
083224d1c0 fixes to job control changes
The job control changes need a couple of fixes for compatibility with
changes I merged while @mqudsi was workin on his change.
2017-08-06 15:25:42 -07:00
Kurtis Rader
52d739c746 Revert "Revert "finish cleanup of signal blocking code""
This reverts commit 35ee28ff24.

Reapply the signal blocking cleanup change on top of the job control
changes made by @mqudsi.
2017-08-06 14:46:12 -07:00
Mahmoud Al-Qudsi
0594735714 Deduplication between INTERNAL_FUNCTION and INTERNAL_BLOCK_NODE 2017-08-06 14:41:27 -07:00
Mahmoud Al-Qudsi
4dfb334db8 Corrected job_type for external command in debug log 2017-08-06 14:41:27 -07:00
Mahmoud Al-Qudsi
384879704a Unified all child/parent forking code in exec_job 2017-08-06 14:41:27 -07:00
Mahmoud Al-Qudsi
4a1de248bc Split internal_exec to its own function 2017-08-06 14:41:27 -07:00
Mahmoud Al-Qudsi
711c81b8c8 Raised debug level for "Retrying setpgid" message 2017-08-06 14:40:18 -07:00
Mahmoud Al-Qudsi
87db424e45 Removed unused <mutex> header include 2017-08-06 14:40:18 -07:00
Mahmoud Al-Qudsi
7e23965250 Cleaned up terminal_give_to_job() code flow and comments
No longer using a lambda for pgroupTerminated, using a boolean flag
instead. The new code structure should be much more self-documenting.
2017-08-06 14:40:18 -07:00
Mahmoud Al-Qudsi
dabe718c52 Removed unused job_t * parameter from setup_child_process 2017-08-06 14:40:18 -07:00
Mahmoud Al-Qudsi
628db65504 OS X EINVAL compatibility for waitpid
The return value on OS X is more along the lines of the documented
waitpid behavior; EINVAL is returned if the group no longer exists.
2017-08-06 14:40:18 -07:00
Mahmoud Al-Qudsi
8e63386203 Removed old/unneeded variants of block_child 2017-08-06 14:40:18 -07:00
Mahmoud Al-Qudsi
16d2f4faff Added important comment about blocked_pid 2017-08-06 14:40:18 -07:00
Mahmoud Al-Qudsi
15da6f0203 Minor refactoring 2017-08-06 14:40:18 -07:00
Mahmoud Al-Qudsi
a0efae5f08 Logging updates 2017-08-06 14:40:18 -07:00
Mahmoud Al-Qudsi
5db8065f15 unblock_previous on exec_job finish 2017-08-06 14:40:18 -07:00
Mahmoud Al-Qudsi
c3d756b5df blocking only if pipes_to_next_command breaks things like read.expect test 2017-08-06 14:40:18 -07:00
Mahmoud Al-Qudsi
b27217e106 terminal_give_to_job() was bypassing the cont branch
If tcgetpgrp for STDIN was already a match, the `cont` branch was
skipped. This wais making the history.expect test fail.
2017-08-06 14:40:18 -07:00