freecwmp
[Top] [All Lists]

[PATCH] fix running in background when compiled with DEVEL_DEBUG

To: freecwmp@linux-mips.org
Subject: [PATCH] fix running in background when compiled with DEVEL_DEBUG
From: Jonas Gorski <jonas.gorski@gmail.com>
Date: Tue, 12 Jun 2012 14:27:59 +0200
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=9RtOiuxcVO0yG2QGUwcHXY/6XMpB9RyYGfRtcPZXIR4=; b=MrZLThWQ0zJ9tfY1/idVOnfzr8IBx0cVzgB2BiRJZX2xJsYK2jsthYe9e4mlL4ivB5 Y7s/CvgIfGUpH6hFKJIFCArGalq+7Xl4eJyB7uhqI6/iqTJBLZ0n6lvHvcus4XUJash/ deG7BaUprm2PVn93VtIE7mqbqQDWHzaw/DytF8Y1BXNiLccEk2TZTx/B0F+Wt/xqw2vq g6nnLqQro8Kxnd+hJgl3+JcxYI5k0DsQe4dihajsezeGmWMxaWvwZVkRPP0T5JnVkilE hiuHEHKKcbISM6on0l5v5TeOhttFTVsbjKue9zmHbnW8QC8n5os2Jm2T0NtME5gkGRxo PuEA==
Original-recipient: rfc822;freecwmp@linux-mips.org
Sender: freecwmp-bounce@linux-mips.org
Don't close STDOUT and STDERR when running in devel debug mode,
as freecwmp will continue writing to them.

Contributed by T-Labs, Deutsche Telekom Innovation Laboratories

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
 src/freecwmp.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/freecwmp.c b/src/freecwmp.c
index 35d89a1..39a0487 100644
--- a/src/freecwmp.c
+++ b/src/freecwmp.c
@@ -284,8 +284,10 @@ int main (int argc, char **argv)
                }
 
                close(STDIN_FILENO);
+#ifndef DEVEL_DEBUG
                close(STDOUT_FILENO);
                close(STDERR_FILENO);
+#endif
        }
 
        uloop_run();
-- 
1.7.10


<Prev in Thread] Current Thread [Next in Thread>