]> git.tdb.fi Git - builder.git/blobdiff - source/externalaction.cpp
Add comments
[builder.git] / source / externalaction.cpp
index b86d8028da25636e5677f00e5eb1763df6a17a94..0ae68ff05f30bd297b314de7a77ac3e471192cb0 100644 (file)
@@ -16,7 +16,7 @@ int ExternalAction::check()
        }
        
        if(!pid)
-               return 255;
+               return exit_code;
 
        int status;
        if(waitpid(pid, &status, WNOHANG)==pid)
@@ -26,12 +26,16 @@ int ExternalAction::check()
                        exit_code=WEXITSTATUS(status);
                else
                        exit_code=254;
+               pid=0;
                return exit_code;
        }
        else
                return -1;
 }
 
+/**
+Starts the external program.  Fill in argv before calling this.
+*/
 void ExternalAction::launch()
 {
        if(builder.get_verbose()>=2)