Patch 8.2.1545
Problem: ch_logfile() is unclear about closing when forking.
Solution: Adjust the log messages.
Files: src/channel.c, src/os_unix.c
*** ../vim-8.2.1544/src/channel.c 2020-08-23 14:28:24.111838486 +0200
--- src/channel.c 2020-08-29 22:39:31.658201090 +0200
***************
*** 144,149 ****
--- 144,150 ----
// Log file opened with ch_logfile().
static FILE *log_fd = NULL;
+ static char_u *log_name = NULL;
#ifdef FEAT_RELTIME
static proftime_T log_start;
#endif
***************
*** 158,164 ****
if (*fname != NUL)
ch_log(NULL, "closing this logfile, opening %s", fname);
else
! ch_log(NULL, "closing logfile");
fclose(log_fd);
}
--- 159,165 ----
if (*fname != NUL)
ch_log(NULL, "closing this logfile, opening %s", fname);
else
! ch_log(NULL, "closing logfile %s", log_name);
fclose(log_fd);
}
***************
*** 170,175 ****
--- 171,178 ----
semsg(_(e_notopen), fname);
return;
}
+ vim_free(log_name);
+ log_name = vim_strsave(fname);
}
log_fd = file;
*** ../vim-8.2.1544/src/os_unix.c 2020-08-23 14:28:24.107838497 +0200
--- src/os_unix.c 2020-08-29 22:48:42.500659990 +0200
***************
*** 4683,4690 ****
# ifdef FEAT_JOB_CHANNEL
if (ch_log_active())
! // close the log file in the child
ch_logfile((char_u *)"", (char_u *)"");
# endif
if (!show_shell_mess || (options & SHELL_EXPAND))
--- 4683,4692 ----
# ifdef FEAT_JOB_CHANNEL
if (ch_log_active())
! {
! ch_log(NULL, "closing channel log in the child process");
ch_logfile((char_u *)"", (char_u *)"");
+ }
# endif
if (!show_shell_mess || (options & SHELL_EXPAND))
*** ../vim-8.2.1544/src/version.c 2020-08-30 15:49:12.158736328 +0200
--- src/version.c 2020-08-30 17:22:28.218072447 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1545,
/**/
--
"Never be afraid to tell the world who you are."
-- Anonymous
/// 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202008301525.07UFP7aN2826398%40masaka.moolenaar.net.