0
0
mirror of https://github.com/vim/vim.git synced 2025-10-14 07:04:10 -04:00

patch 7.4.1537

Problem:    Too many feature flags for pipes, jobs and channels.
Solution:   Only use FEAT_JOB_CHANNEL.
This commit is contained in:
Bram Moolenaar
2016-03-11 22:52:15 +01:00
parent de27989157
commit 509ce2a558
22 changed files with 72 additions and 200 deletions

View File

@@ -1492,7 +1492,7 @@ WaitForChar(long msec)
{
DWORD dwWaitTime = dwEndTime - dwNow;
#ifdef FEAT_CHANNEL
#ifdef FEAT_JOB_CHANNEL
/* Check channel while waiting input. */
if (dwWaitTime > 100)
dwWaitTime = 100;
@@ -4991,7 +4991,7 @@ mch_call_shell(
return x;
}
#if defined(FEAT_JOB) || defined(PROTO)
#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
static HANDLE
job_io_file_open(
char_u *fname,
@@ -5033,7 +5033,6 @@ mch_start_job(char *cmd, job_T *job, jobopt_T *options)
STARTUPINFO si;
PROCESS_INFORMATION pi;
HANDLE jo;
# ifdef FEAT_CHANNEL
SECURITY_ATTRIBUTES saAttr;
channel_T *channel = NULL;
HANDLE ifd[2];
@@ -5057,7 +5056,6 @@ mch_start_job(char *cmd, job_T *job, jobopt_T *options)
ofd[1] = INVALID_HANDLE_VALUE;
efd[0] = INVALID_HANDLE_VALUE;
efd[1] = INVALID_HANDLE_VALUE;
# endif
jo = CreateJobObject(NULL, NULL);
if (jo == NULL)
@@ -5072,7 +5070,6 @@ mch_start_job(char *cmd, job_T *job, jobopt_T *options)
si.dwFlags |= STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE;
# ifdef FEAT_CHANNEL
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
saAttr.bInheritHandle = TRUE;
saAttr.lpSecurityDescriptor = NULL;
@@ -5149,7 +5146,6 @@ mch_start_job(char *cmd, job_T *job, jobopt_T *options)
if (channel == NULL)
goto failed;
}
# endif
if (!vim_create_process(cmd, TRUE,
CREATE_SUSPENDED |
@@ -5176,7 +5172,6 @@ mch_start_job(char *cmd, job_T *job, jobopt_T *options)
job->jv_job_object = jo;
job->jv_status = JOB_STARTED;
# ifdef FEAT_CHANNEL
if (!use_file_for_in)
CloseHandle(ifd[0]);
if (!use_file_for_out)
@@ -5196,11 +5191,9 @@ mch_start_job(char *cmd, job_T *job, jobopt_T *options)
? INVALID_FD : (sock_T)efd[0]);
channel_set_job(channel, job, options);
}
# endif
return;
failed:
# ifdef FEAT_CHANNEL
CloseHandle(ifd[0]);
CloseHandle(ofd[0]);
CloseHandle(efd[0]);
@@ -5208,9 +5201,6 @@ failed:
CloseHandle(ofd[1]);
CloseHandle(efd[1]);
channel_unref(channel);
# else
; /* make compiler happy */
# endif
}
char *