]> git.tdb.fi Git - builder.git/blobdiff - source/misc.cpp
Bugfixes
[builder.git] / source / misc.cpp
index ab61d9f1fe0f38058917de552b6d8bfc3b0deb19..cf180ce1beada0ab0a4ce2dc23e829fdd3d258a9 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2006-200 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
@@ -15,10 +15,6 @@ Distributed under the LGPL
 using namespace std;
 using namespace Msp;
 
-/**
-Runs a command and returns its output as a string.  The exit status of the
-command is lost.
-*/
 string run_command(const StringList &argv)
 {
        int pfd[2];
@@ -63,6 +59,7 @@ string run_command(const StringList &argv)
                        else
                                result.append(buf, len);
                }
+               close(pfd[0]);
        }
 
        return result;