[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openssh-bugs
Subject:    [Bug 1988] ControlPersist causes stderr to be left open until the master connection times out
From:       bugzilla-daemon () mindrot ! org
Date:       2013-06-07 1:40:47
Message-ID: bug-1988-705-5vV2CyHsID () https ! bugzilla ! mindrot ! org/
[Download RAW message or body]

https://bugzilla.mindrot.org/show_bug.cgi?id=1988

Damien Miller <djm@mindrot.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #2299|ok?(djm@mindrot.org)        |ok+
              Flags|                            |

--- Comment #6 from Damien Miller <djm@mindrot.org> ---
Comment on attachment 2299
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2299
daemonize backgrounded mux master with controlpersist

>Index: ssh.c
>===================================================================
>RCS file: /cvs/src/usr.bin/ssh/ssh.c,v
>retrieving revision 1.378
>diff -u -p -r1.378 ssh.c
>--- ssh.c	17 May 2013 00:13:14 -0000	1.378
>+++ ssh.c	6 Jun 2013 01:51:58 -0000
>@@ -947,6 +947,8 @@ control_persist_detach(void)
> 		fatal("%s: fork: %s", __func__, strerror(errno));
> 	case 0:
> 		/* Child: master process continues mainloop */
>+		if (daemon(1, 0) == -1)
>+ 			fatal("Failed to daemonize control master");

I'd prefer this happen in the block after the switch statement, where
the fd cleanup already occurs.

Otherwise ok by me

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic