From e94a964e7dd03d0dd6923d7fc62bc46bd4431189 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sat, 19 May 2018 02:39:56 +0800 Subject: eval: Add vfork support This patch adds basic vfork support for the case of a simple command. Signed-off-by: Herbert Xu --- src/jobs.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/jobs.h') diff --git a/src/jobs.h b/src/jobs.h index 953ee87..6ac6c56 100644 --- a/src/jobs.h +++ b/src/jobs.h @@ -83,6 +83,8 @@ struct job { struct job *prev_job; /* previous job */ }; +union node; + extern pid_t backgndpid; /* pid of last background process */ extern int job_warning; /* user was warned about stopped jobs */ #if JOBS @@ -90,6 +92,7 @@ extern int jobctl; /* true if doing job control */ #else #define jobctl 0 #endif +extern int vforked; /* Set if we are in the vforked child */ void setjobctl(int); int killcmd(int, char **); @@ -101,6 +104,7 @@ void showjobs(struct output *, int); int waitcmd(int, char **); struct job *makejob(union node *, int); int forkshell(struct job *, union node *, int); +struct job *vforkexec(union node *n, char **argv, const char *path, int idx); int waitforjob(struct job *); int stoppedjobs(void); -- cgit 1.4.1