run_in_background: fix execution when debug mode is enabled
authorSimon Ruderich <simon@ruderich.org>
Sat, 23 Jan 2016 16:46:43 +0000 (17:46 +0100)
committerSimon Ruderich <simon@ruderich.org>
Sat, 23 Jan 2016 16:46:43 +0000 (17:46 +0100)
bin/fcscs

index 054842aeebd915e25deedbc36a876f72655bc253..0033af86f8eeb10be82aa8c27fa81ee2cb019854 100755 (executable)
--- a/bin/fcscs
+++ b/bin/fcscs
@@ -458,6 +458,9 @@ sub run_in_background {
         my $pid = fork;
         defined $pid or die $!;
         if ($pid == 0) { # child
+            # Disable debug mode as writing will fail with closed STDERR.
+            $config->{setting}{debug} = 0;
+
             $sub->();
         }
         exit;