To: vim-dev@vim.org Subject: Patch 6.1.180 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.180 Problem: Use of the GUI code for forking is inconsistent. Solution: Define MAY_FORK and use it for later #ifdefs. (Ben Fowlwer) Files: src/gui.c *** ../vim61.179/src/gui.c Tue Jun 4 20:01:34 2002 --- src/gui.c Sat Sep 14 14:35:35 2002 *************** *** 48,55 **** gui_start() { char_u *old_term; ! #if defined(UNIX) && !defined(__BEOS__) ! pid_t pid = -1; int dofork = TRUE; #endif static int recursive = 0; --- 48,55 ---- gui_start() { char_u *old_term; ! #if defined(UNIX) && !defined(__BEOS__) && !defined(MACOS_X) ! # define MAY_FORK int dofork = TRUE; #endif static int recursive = 0; *************** *** 72,78 **** gui.starting = TRUE; full_screen = FALSE; ! #if defined(UNIX) && !defined(__BEOS__) if (!gui.dofork || vim_strchr(p_go, GO_FORG) || recursive) dofork = FALSE; #endif --- 72,78 ---- gui.starting = TRUE; full_screen = FALSE; ! #ifdef MAY_FORK if (!gui.dofork || vim_strchr(p_go, GO_FORG) || recursive) dofork = FALSE; #endif *************** *** 98,104 **** display_errors(); #endif ! #if defined(UNIX) && !defined(__BEOS__) && !defined(__QNXNTO__) && !defined(MACOS_X) /* * Quit the current process and continue in the child. * Makes "gvim file" disconnect from the shell it was started in. --- 98,104 ---- display_errors(); #endif ! #if defined(MAY_FORK) && !defined(__QNXNTO__) /* * Quit the current process and continue in the child. * Makes "gvim file" disconnect from the shell it was started in. *************** *** 110,115 **** --- 110,116 ---- int pipefd[2]; /* pipe between parent and child */ int pipe_error; char dummy; + pid_t pid = -1; /* Setup a pipe between the child and the parent, so that the parent * knows when the child has done the setsid() call and is allowed to *** ../vim61.179/src/version.c Mon Sep 16 21:05:55 2002 --- src/version.c Mon Sep 16 21:10:28 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 180, /**/ -- Managers are like cats in a litter box. They instinctively shuffle things around to conceal what they've done. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///