From 443f6b76a964b77e2e61c03592a83ffa0a6da4b1 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 10 Apr 2014 11:39:14 +0200 Subject: Make use of internal iospawn flags more flexible. * src/priv-io.h (IOSPAWN_FLAG_DETACHED): New. Renumber the others. * src/w32-io.c (_gpgme_io_spawn): Use DETACHED_PROCESS process only if IOSPAWN_FLAG_DETACHED is given. * src/w32-qt-io.cpp (_gpgme_io_spawn): Ditto. * src/w32-glib-io.c (_gpgme_io_spawn): Ditto. * src/assuan-support.c (my_spawn): Pass IOSPAWN_FLAG_DETACHED flags. * src/dirinfo.c (read_gpgconf_dirs): Ditto. * src/engine-gpg.c (start): Ditto. * src/engine-gpgconf.c (gpgconf_read, gpgconf_write): Ditto. * src/version.c (_gpgme_get_program_version): Ditto. --- src/priv-io.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/priv-io.h') diff --git a/src/priv-io.h b/src/priv-io.h index 4058b3b1..583f06ad 100644 --- a/src/priv-io.h +++ b/src/priv-io.h @@ -75,11 +75,13 @@ int _gpgme_io_set_close_notify (int fd, _gpgme_close_notify_handler_t handler, void *value); int _gpgme_io_set_nonblocking (int fd); +/* Under Windows do not allocate a console. */ +#define IOSPAWN_FLAG_DETACHED 1 /* A flag to tell the spawn function to allow the child process to set the foreground window. */ -#define IOSPAWN_FLAG_ALLOW_SET_FG 1 +#define IOSPAWN_FLAG_ALLOW_SET_FG 2 /* Don't close any child FDs. */ -#define IOSPAWN_FLAG_NOCLOSE 2 +#define IOSPAWN_FLAG_NOCLOSE 4 /* Spawn the executable PATH with ARGV as arguments. After forking close all fds except for those in FD_LIST in the child, then -- cgit v1.2.3