From 44cba5b5596c1efcc9d0022a9b0cfa80767deb2e Mon Sep 17 00:00:00 2001 From: imaginos Date: Sat, 28 Aug 2004 17:11:37 +0000 Subject: [PATCH] term would hang aftfter launch on logout do to open fd's related to stderr/stdin/stdout git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@22 726aef4b-f618-498e-8847-2d620e286838 --- main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.cpp b/main.cpp index af19d5b2..49181974 100644 --- a/main.cpp +++ b/main.cpp @@ -68,6 +68,12 @@ int main(int argc, char** argv) { pZNC->WritePidFile(iPid); exit(0); } + + /* keep the term from hanging on logout */ + close( 0 ); + close( 1 ); + close( 2 ); + #endif struct sigaction sa;