Patch 7.4.1328
Problem: Can't compile with +job but without +channel. (John Marriott)
Solution: Add more #ifdefs.
Files: src/os_unix.c
*** ../vim-7.4.1327/src/os_unix.c 2016-02-14 23:02:29.838701624 +0100
--- src/os_unix.c 2016-02-15 23:07:47.652297287 +0100
***************
*** 5043,5049 ****
--- 5043,5051 ----
int fd_in[2]; /* for stdin */
int fd_out[2]; /* for stdout */
int fd_err[2]; /* for stderr */
+ # ifdef FEAT_CHANNEL
channel_T *channel = NULL;
+ #endif
/* default is to fail */
job->jv_status = JOB_FAILED;
***************
*** 5051,5056 ****
--- 5053,5060 ----
fd_out[0] = -1;
fd_err[0] = -1;
+ /* TODO: without the channel feature connect the child to /dev/null? */
+ # ifdef FEAT_CHANNEL
/* Open pipes for stdin, stdout, stderr. */
if ((pipe(fd_in) < 0) || (pipe(fd_out) < 0) ||(pipe(fd_err) < 0))
goto failed;
***************
*** 5058,5063 ****
--- 5062,5068 ----
channel = add_channel();
if (channel == NULL)
goto failed;
+ # endif
pid = fork(); /* maybe we should use vfork() */
if (pid == -1)
***************
*** 5080,5085 ****
--- 5085,5092 ----
set_child_environment();
+ /* TODO: re-enable this when pipes connect without a channel */
+ # ifdef FEAT_CHANNEL
/* set up stdin for the child */
close(fd_in[1]);
close(0);
***************
*** 5097,5102 ****
--- 5104,5110 ----
close(2);
ignored = dup(fd_err[1]);
close(fd_err[1]);
+ # endif
/* See above for type of argv. */
execvp(argv[0], argv);
***************
*** 5108,5130 ****
/* parent */
job->jv_pid = pid;
job->jv_status = JOB_STARTED;
job->jv_channel = channel;
/* child stdin, stdout and stderr */
close(fd_in[0]);
close(fd_out[1]);
close(fd_err[1]);
channel_set_pipes(channel, fd_in[1], fd_out[0], fd_err[0]);
channel_set_job(channel, job);
! #ifdef FEAT_GUI
channel_gui_register(channel);
! #endif
return;
failed:
if (channel != NULL)
channel_free(channel);
if (fd_in[0] >= 0)
{
close(fd_in[0]);
--- 5116,5144 ----
/* parent */
job->jv_pid = pid;
job->jv_status = JOB_STARTED;
+ # ifdef FEAT_CHANNEL
job->jv_channel = channel;
+ # endif
/* child stdin, stdout and stderr */
close(fd_in[0]);
close(fd_out[1]);
close(fd_err[1]);
+ # ifdef FEAT_CHANNEL
channel_set_pipes(channel, fd_in[1], fd_out[0], fd_err[0]);
channel_set_job(channel, job);
! # ifdef FEAT_GUI
channel_gui_register(channel);
! # endif
! # endif
return;
failed:
+ # ifdef FEAT_CHANNEL
if (channel != NULL)
channel_free(channel);
+ # endif
if (fd_in[0] >= 0)
{
close(fd_in[0]);
*** ../vim-7.4.1327/src/version.c 2016-02-15 22:55:22.556121050 +0100
--- src/version.c 2016-02-15 23:02:08.695857364 +0100
***************
*** 749,750 ****
--- 749,752 ----
{ /* Add new patch number below this line */
+ /**/
+ 1328,
/**/
--
Women are probably the main cause of free software starvation.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.