From 1a0987904fa571dc5abce03726e4ca3e17793574 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Thu, 1 Mar 2018 15:31:45 -0800 Subject: Generalize our process spawning code. Move the contents of extcap_spawn to ws_pipe. Rename various extcap_* prefixes to ws_pipe_*. Open stdin when we spawn processes. Change-Id: I9286295443ee955bb6328b0ed6f945ee0bb2a798 Reviewed-on: https://code.wireshark.org/review/26216 Reviewed-by: Gerald Combs Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- extcap_spawn.h | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 extcap_spawn.h (limited to 'extcap_spawn.h') diff --git a/extcap_spawn.h b/extcap_spawn.h deleted file mode 100644 index 0557a6f352..0000000000 --- a/extcap_spawn.h +++ /dev/null @@ -1,54 +0,0 @@ -/* extcap_spawn.h - * Helper routines for executing extcap utilities - * - * Copyright 2016, Roland Knall - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * Copyright 1998 Gerald Combs - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#ifndef __EXTCAP_SPAWN_H__ -#define __EXTCAP_SPAWN_H__ - -#include - -#include - -#include - -typedef struct _extcap_userdata { - GPid pid; - gchar * extcap_stderr; - gint exitcode; - gint extcap_stderr_rd; - gint extcap_stdout_rd; -#ifdef _WIN32 - HANDLE threadId; -#endif -} extcap_userdata; - -gboolean extcap_spawn_sync ( gchar * dirname, gchar * command, gint argc, gchar ** argv, gchar ** command_output ); - -GPid extcap_spawn_async ( extcap_userdata * userdata, GPtrArray * args ); - -#ifdef _WIN32 -gboolean extcap_wait_for_pipe(HANDLE * pipe_handles, int num_pipe_handles, HANDLE pid); -#endif - -#endif - -/* - * Editor modelines - http://www.wireshark.org/tools/modelines.html - * - * Local variables: - * c-basic-offset: 4 - * tab-width: 8 - * indent-tabs-mode: nil - * End: - * - * vi: set shiftwidth=4 tabstop=8 expandtab: - * :indentSize=4:tabSize=8:noTabs=true: - */ -- cgit v1.2.3