diff options
Diffstat (limited to 'guts/fork.c')
-rw-r--r-- | guts/fork.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/guts/fork.c b/guts/fork.c index 4a91f7b..fa23be1 100644 --- a/guts/fork.c +++ b/guts/fork.c @@ -6,10 +6,19 @@ * wrap_fork(void) { * int rc = -1; */ - rc = real_fork(); - if (rc == 0) - pseudo_client_reset(); - + if (real_fork) { + rc = real_fork(); + /* special case: we may want to enable or disable + * pseudo in the child process + */ + if (rc == 0) { + pseudo_setupenv(); + pseudo_client_reset(); + } + } else { + /* rc was initialized to the "failure" value */ + pseudo_enosys("fork"); + } /* return rc; * } */ |