Skip to content

Commit fde8fd5

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents c1e8125 + c4d4ac2 commit fde8fd5

3 files changed

Lines changed: 24 additions & 2 deletions

File tree

src/os_unix.c

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ static volatile int deadly_signal = 0; /* The signal we caught */
238238
/* volatile because it is used in signal handler deathtrap(). */
239239
static volatile int in_mch_delay = FALSE; /* sleeping in mch_delay() */
240240

241+
#if defined(FEAT_JOB_CHANNEL) && !defined(USE_SYSTEM)
242+
static int dont_check_job_ended = 0;
243+
#endif
244+
241245
static int curr_tmode = TMODE_COOK; /* contains current terminal mode */
242246

243247
#ifdef USE_XSMP
@@ -4503,7 +4507,9 @@ mch_call_shell(
45034507
catch_signals(SIG_IGN, SIG_ERR);
45044508
catch_int_signal();
45054509
UNBLOCK_SIGNALS(&curset);
4506-
4510+
# ifdef FEAT_JOB_CHANNEL
4511+
++dont_check_job_ended;
4512+
# endif
45074513
/*
45084514
* For the GUI we redirect stdin, stdout and stderr to our window.
45094515
* This is also used to pipe stdin/stdout to/from the external
@@ -5052,6 +5058,10 @@ mch_call_shell(
50525058
wait4pid(wpid, NULL);
50535059
}
50545060

5061+
# ifdef FEAT_JOB_CHANNEL
5062+
--dont_check_job_ended;
5063+
# endif
5064+
50555065
/*
50565066
* Set to raw mode right now, otherwise a CTRL-C after
50575067
* catch_signals() will kill Vim.
@@ -5385,6 +5395,14 @@ mch_detect_ended_job(job_T *job_list)
53855395
pid_t wait_pid = 0;
53865396
job_T *job;
53875397

5398+
# ifndef USE_SYSTEM
5399+
/* Do not do this when waiting for a shell command to finish, we would get
5400+
* the exit value here (and discard it), the exit value obtained there
5401+
* would then be wrong. */
5402+
if (dont_check_job_ended > 0)
5403+
return NULL;
5404+
# endif
5405+
53885406
# ifdef __NeXT__
53895407
wait_pid = wait4(-1, &status, WNOHANG, (struct rusage *)0);
53905408
# else

src/testdir/Make_ming.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ win32: fixff nolog $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_WIN32) newtests
6868
fixff:
6969
-$(VIMPROG) -u dos.vim $(NO_PLUGIN) "+argdo set ff=dos|upd" +q *.in *.ok
7070
-$(VIMPROG) -u dos.vim $(NO_PLUGIN) "+argdo set ff=unix|upd" +q \
71-
dotest.in test60.ok test71.ok test74.ok test_listchars.ok \
71+
dotest.in test60.ok test_listchars.ok \
7272
test_getcwd.ok test_wordcount.ok
7373

7474
clean:

src/version.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,10 @@ static char *(features[]) =
779779

780780
static int included_patches[] =
781781
{ /* Add new patch number below this line */
782+
/**/
783+
71,
784+
/**/
785+
70,
782786
/**/
783787
69,
784788
/**/

0 commit comments

Comments
 (0)