diff options
Diffstat (limited to '')
| -rw-r--r-- | src/posix-io.c | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/src/posix-io.c b/src/posix-io.c index b173f58e..6c33d9fc 100644 --- a/src/posix-io.c +++ b/src/posix-io.c @@ -305,7 +305,9 @@ _gpgme_io_waitpid (int pid, int hang, int *r_status, int *r_signal)  /* Returns 0 on success, -1 on error.  */  int  _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags, -		 struct spawn_fd_item_s *fd_list, pid_t *r_pid) +		 struct spawn_fd_item_s *fd_list, +		 void (*atfork) (void *opaque, int reserved), +		 void *atforkvalue, pid_t *r_pid)  {    pid_t pid;    int i; @@ -344,6 +346,9 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,  	  int seen_stdin = 0;  	  int seen_stderr = 0; +	  if (atfork) +	    atfork (atforkvalue, 0); +  	  /* First close all fds which will not be inherited.  */  	  for (fd = 0; fd < max_fds; fd++)  	    { | 
