Imported Upstream version 1.14.0
[platform/upstream/gpgme.git] / src / engine-spawn.c
index 7044781..0eeaeb1 100644 (file)
@@ -1,21 +1,22 @@
 /* engine-spawn.c - Run an arbitrary program
-   Copyright (C) 2014 g10 Code GmbH
-
-   This file is part of GPGME.
-
-   GPGME is free software; you can redistribute it and/or modify it
-   under the terms of the GNU Lesser General Public License as
-   published by the Free Software Foundation; either version 2.1 of
-   the License, or (at your option) any later version.
-
-   GPGME is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program; if not, see <https://www.gnu.org/licenses/>.
-*/
+ * Copyright (C) 2014 g10 Code GmbH
+ *
+ * This file is part of GPGME.
+ *
+ * GPGME is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * GPGME is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see <https://gnu.org/licenses/>.
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
 
 #if HAVE_CONFIG_H
 #include <config.h>
@@ -241,7 +242,8 @@ engspawn_start (engine_spawn_t esp, const char *file, const char *argv[],
     spflags |= IOSPAWN_FLAG_DETACHED;
   if ((flags & GPGME_SPAWN_ALLOW_SET_FG))
     spflags |= IOSPAWN_FLAG_ALLOW_SET_FG;
-
+  if ((flags & GPGME_SPAWN_SHOW_WINDOW))
+    spflags |= IOSPAWN_FLAG_SHOW_WINDOW;
 
   err = build_fd_data_map (esp);
   if (err)
@@ -379,7 +381,7 @@ engspawn_io_event (void *engine, gpgme_event_io_t type, void *type_data)
 {
   engine_spawn_t esp = engine;
 
-  TRACE3 (DEBUG_ENGINE, "gpgme:engspawn_io_event", esp,
+  TRACE (DEBUG_ENGINE, "gpgme:engspawn_io_event", esp,
           "event %p, type %d, type_data %p",
           esp->io_cbs.event, type, type_data);
   if (esp->io_cbs.event)
@@ -448,6 +450,7 @@ struct engine_ops _gpgme_engine_ops_spawn =
     NULL,              /* set_colon_line_handler */
     NULL,              /* set_locale */
     NULL,              /* set_protocol */
+    NULL,               /* set_engine_flags */
     NULL,              /* decrypt */
     NULL,              /* delete */
     NULL,              /* edit */
@@ -463,7 +466,6 @@ struct engine_ops _gpgme_engine_ops_spawn =
     NULL,               /* keysign */
     NULL,               /* tofu_policy */
     NULL,              /* sign */
-    NULL,              /* trustlist */
     NULL,              /* verify */
     NULL,              /* getauditlog */
     NULL,               /* opassuan_transact */