From 847bcb63b541e4fbbfa3dccfe3022745cbe9a06a Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 23 Sep 2015 22:18:22 -0500 Subject: Add xvfork() as a static inline and use it from various places. Note: vfork(), like fork(), can return -1 if too many processes, and we should notice and fail loudly. --- toys/pending/sh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/pending/sh.c') diff --git a/toys/pending/sh.c b/toys/pending/sh.c index 499c5dbd..87f2f9ff 100644 --- a/toys/pending/sh.c +++ b/toys/pending/sh.c @@ -305,7 +305,7 @@ static void run_pipeline(struct pipeline *line) } else { int status; - cmd->pid = vfork(); + cmd->pid = xvfork(); if (!cmd->pid) xexec(cmd->argv); else waitpid(cmd->pid, &status, 0); -- cgit v1.2.3