From cd28e45d446e8dc545666a5e48da80e308b21746 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Wed, 23 May 2018 13:39:43 +0200 Subject: [PATCH] cmds: enable redirection of all output to /dev/null --- src/anbox/cmds/launch.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/anbox/cmds/launch.cpp b/src/anbox/cmds/launch.cpp index 5ffbd57..c6c9e2b 100644 --- a/src/anbox/cmds/launch.cpp +++ b/src/anbox/cmds/launch.cpp @@ -39,7 +39,6 @@ const std::chrono::seconds session_mgr_wait_interval{5}; constexpr unsigned int max_dbus_service_wait_attempts{10}; const std::chrono::seconds dbus_service_wait_interval{5}; -#if 0 static int redirect_to_null(int flags, int fd) { int fd2; if ((fd2 = open("/dev/null", flags)) < 0) @@ -54,7 +53,6 @@ static int redirect_to_null(int flags, int fd) { close(fd2); return fd; } -#endif } // namespace bool anbox::cmds::Launch::launch_session_manager() { @@ -74,7 +72,6 @@ bool anbox::cmds::Launch::launch_session_manager() { auto flags = core::posix::StandardStream::empty; auto child = core::posix::fork([&]() { -#if 0 // We redirect all in/out/err to /dev/null as they can't be seen // anywhere. All logging output will directly go to syslog as we // will become a session leader below which will get us rid of a @@ -86,8 +83,6 @@ bool anbox::cmds::Launch::launch_session_manager() { return core::posix::exit::Status::failure; } -#endif - // As we forked one time already we're sure that our process is // not the session leader anymore so we can safely become the // new one and lead the process group.