summaryrefslogtreecommitdiffstats
path: root/run-command.c
diff options
context:
space:
mode:
Diffstat (limited to 'run-command.c')
-rw-r--r--run-command.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/run-command.c b/run-command.c
index e2bc18a08..3db26b7b0 100644
--- a/run-command.c
+++ b/run-command.c
@@ -1228,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;
}
}
@@ -1261,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;