]> git.tdb.fi Git - builder.git/blobdiff - source/externalaction.cpp
Replace per-file copyright notices with a single file
[builder.git] / source / externalaction.cpp
index 7e0a23de5021bcd7f3211fe201e7f85169727106..cad9ba8b23d659e3be069ce1dd7eee57c0c4e5df 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2006-2009  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #include <cstring>
 #include <cstdlib>
 #include <sys/wait.h>
@@ -23,18 +16,18 @@ void ExternalAction::launch()
                IO::print("%s\n", join(argv.begin(), argv.end()));
 
        if(builder.get_dry_run())
-               pid=-1;
+               pid = -1;
        else
        {
-               pid=fork();
+               pid = fork();
                if(pid==0)
                {
                        char *argv_[argv.size()+1];
 
-                       unsigned j=0;
+                       unsigned j = 0;
                        for(StringList::iterator i=argv.begin(); i!=argv.end(); ++i)
-                               argv_[j++]=strdup(i->c_str());
-                       argv_[j]=0;
+                               argv_[j++] = strdup(i->c_str());
+                       argv_[j] = 0;
 
                        if(!work_dir.empty())
                                FS::chdir(work_dir);
@@ -43,7 +36,7 @@ void ExternalAction::launch()
                        exit(1);
                }
                else if(pid<0)
-                       pid=0;
+                       pid = 0;
        }
 }
 
@@ -63,10 +56,10 @@ int ExternalAction::check()
        {
                signal_done.emit();
                if(WIFEXITED(status))
-                       exit_code=WEXITSTATUS(status);
+                       exit_code = WEXITSTATUS(status);
                else
-                       exit_code=254;
-               pid=0;
+                       exit_code = 254;
+               pid = 0;
                return exit_code;
        }
        else