push: flag updates that require force
[gitweb.git] / run-command.c
index f9922b9ecc8e4956e19d7143bb6cb6ef4d97abf8..3b982e4d55274ebe87c5751fa198bee53e371d9b 100644 (file)
@@ -53,13 +53,14 @@ static void mark_child_for_cleanup(pid_t pid)
 
 static void clear_child_for_cleanup(pid_t pid)
 {
-       struct child_to_clean **last, *p;
+       struct child_to_clean **pp;
 
-       last = &children_to_clean;
-       for (p = children_to_clean; p; p = p->next) {
-               if (p->pid == pid) {
-                       *last = p->next;
-                       free(p);
+       for (pp = &children_to_clean; *pp; pp = &(*pp)->next) {
+               struct child_to_clean *clean_me = *pp;
+
+               if (clean_me->pid == pid) {
+                       *pp = clean_me->next;
+                       free(clean_me);
                        return;
                }
        }
@@ -396,16 +397,6 @@ int start_command(struct child_process *cmd)
                                        unsetenv(*cmd->env);
                        }
                }
-               if (cmd->preexec_cb) {
-                       /*
-                        * We cannot predict what the pre-exec callback does.
-                        * Forgo parent notification.
-                        */
-                       close(child_notifier);
-                       child_notifier = -1;
-
-                       cmd->preexec_cb();
-               }
                if (cmd->git_cmd) {
                        execv_git_cmd(cmd->argv);
                } else if (cmd->use_shell) {