Blame SOURCES/0006-Close-stdin-out-err-before-listening-for-incoming-co.patch

90e381
From 423cbf4ddca6578b87e0f8a3fc425688cd1ca89c Mon Sep 17 00:00:00 2001
90e381
From: Martin Sehnoutka <msehnout@redhat.com>
90e381
Date: Tue, 6 Sep 2016 16:18:39 +0200
90e381
Subject: [PATCH 06/59] Close stdin/out/err before listening for incoming
90e381
 connections.
90e381
90e381
When running vsftpd as a stand-alone FTP daemon, vsftpd
90e381
did not close stdin/out/err. This caused the start script
90e381
to hang waiting for stdin to close. Before this patch was
90e381
applied, one had to hit ctrl+c in order to get shell prompt
90e381
back. Correct behavior:
90e381
$ /etc/init.d/vsftpd start | tee
90e381
Starting vsftpd for vsftpd:                                [  OK  ]
90e381
$
90e381
---
90e381
 standalone.c | 3 +++
90e381
 1 file changed, 3 insertions(+)
90e381
90e381
diff --git a/standalone.c b/standalone.c
90e381
index ba01ab1..e0f2d5b 100644
90e381
--- a/standalone.c
90e381
+++ b/standalone.c
90e381
@@ -130,6 +130,9 @@ vsf_standalone_main(void)
90e381
       die("could not bind listening IPv6 socket");
90e381
     }
90e381
   }
90e381
+  vsf_sysutil_close(0);
90e381
+  vsf_sysutil_close(1);
90e381
+  vsf_sysutil_close(2);
90e381
   retval = vsf_sysutil_listen(listen_sock, VSFTP_LISTEN_BACKLOG);
90e381
   if (vsf_sysutil_retval_is_error(retval))
90e381
   {
90e381
-- 
90e381
2.14.4
90e381