From: Igor Kulaychuk Date: Mon, 23 Apr 2018 16:49:22 +0000 (+0300) Subject: Close stdin, stdout and stderr when using --server option X-Git-Tag: submit/tizen/20180620.071641~7^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6bbd062ac7d3ad2cbf0d54f7a5cdf2918b9a4682;p=sdk%2Ftools%2Fnetcoredbg.git Close stdin, stdout and stderr when using --server option --- diff --git a/src/debug/netcoredbg/platform.cpp b/src/debug/netcoredbg/platform.cpp index 1482f1d..78ec636 100644 --- a/src/debug/netcoredbg/platform.cpp +++ b/src/debug/netcoredbg/platform.cpp @@ -313,6 +313,11 @@ IORedirectServer::IORedirectServer(uint16_t port) : m_in(nullptr), m_out(nullptr } ::listen(m_sockfd, 5); + + close(STDIN_FILENO); + close(STDOUT_FILENO); + close(STDERR_FILENO); + clilen = sizeof(cli_addr); newsockfd = ::accept(m_sockfd, (struct sockaddr *) &cli_addr, &clilen); if (newsockfd < 0)