remote-testgit: move it into the support directory for t5801
[gitweb.git] / run-command.c
index d679cc267c39b9fb34f57078db5db12ed591b7e2..3db26b7b0e2ab9b6b615387b36a2cd6b64800e9e 100644 (file)
@@ -728,6 +728,8 @@ int start_command(struct child_process *cmd)
        if (prepare_cmd(&argv, cmd) < 0) {
                failed_errno = errno;
                cmd->pid = -1;
+               if (!cmd->silent_exec_failure)
+                       error_errno("cannot run %s", cmd->argv[0]);
                goto end_of_spawn;
        }
 
@@ -1226,7 +1228,7 @@ int start_async(struct async *async)
        {
                int err = pthread_create(&async->tid, NULL, run_thread, async);
                if (err) {
-                       error_errno("cannot create thread");
+                       error(_("cannot create async thread: %s"), strerror(err));
                        goto error;
                }
        }
@@ -1259,6 +1261,15 @@ int finish_async(struct async *async)
 #endif
 }
 
+int async_with_fork(void)
+{
+#ifdef NO_PTHREADS
+       return 1;
+#else
+       return 0;
+#endif
+}
+
 const char *find_hook(const char *name)
 {
        static struct strbuf path = STRBUF_INIT;