diff --git a/src/os_unix.c b/src/os_unix.c index 34ffd5ce45..239eed2f7b 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -238,6 +238,10 @@ static volatile int deadly_signal = 0; /* The signal we caught */ /* volatile because it is used in signal handler deathtrap(). */ static volatile int in_mch_delay = FALSE; /* sleeping in mch_delay() */ +#if defined(FEAT_JOB_CHANNEL) && !defined(USE_SYSTEM) +static int dont_check_job_ended = 0; +#endif + static int curr_tmode = TMODE_COOK; /* contains current terminal mode */ #ifdef USE_XSMP @@ -4503,7 +4507,9 @@ mch_call_shell( catch_signals(SIG_IGN, SIG_ERR); catch_int_signal(); UNBLOCK_SIGNALS(&curset); - +# ifdef FEAT_JOB_CHANNEL + ++dont_check_job_ended; +# endif /* * For the GUI we redirect stdin, stdout and stderr to our window. * This is also used to pipe stdin/stdout to/from the external @@ -5052,6 +5058,10 @@ finished: wait4pid(wpid, NULL); } +# ifdef FEAT_JOB_CHANNEL + --dont_check_job_ended; +# endif + /* * Set to raw mode right now, otherwise a CTRL-C after * catch_signals() will kill Vim. @@ -5385,6 +5395,14 @@ mch_detect_ended_job(job_T *job_list) pid_t wait_pid = 0; job_T *job; +# ifndef USE_SYSTEM + /* Do not do this when waiting for a shell command to finish, we would get + * the exit value here (and discard it), the exit value obtained there + * would then be wrong. */ + if (dont_check_job_ended > 0) + return NULL; +# endif + # ifdef __NeXT__ wait_pid = wait4(-1, &status, WNOHANG, (struct rusage *)0); # else diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak index 33306910ad..ab6a60b924 100644 --- a/src/testdir/Make_ming.mak +++ b/src/testdir/Make_ming.mak @@ -68,7 +68,7 @@ win32: fixff nolog $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_WIN32) newtests fixff: -$(VIMPROG) -u dos.vim $(NO_PLUGIN) "+argdo set ff=dos|upd" +q *.in *.ok -$(VIMPROG) -u dos.vim $(NO_PLUGIN) "+argdo set ff=unix|upd" +q \ - dotest.in test60.ok test71.ok test74.ok test_listchars.ok \ + dotest.in test60.ok test_listchars.ok \ test_getcwd.ok test_wordcount.ok clean: diff --git a/src/version.c b/src/version.c index 124e84f766..6475b06fbb 100644 --- a/src/version.c +++ b/src/version.c @@ -779,6 +779,10 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 71, +/**/ + 70, /**/ 69, /**/