__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
/*
* spawn.h - this file is part of Geany, a fast and lightweight IDE
*
* Copyright 2013 The Geany contributors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef GEANY_SPAWN_H
#define GEANY_SPAWN_H 1
#include <glib.h>
#ifdef G_OS_WIN32
# define SPAWN_WIFEXITED(status) TRUE
# define SPAWN_WEXITSTATUS(status) (status)
# define SPAWN_WIFSIGNALED(status) FALSE
#else
# include <sys/types.h>
# include <sys/wait.h>
# define SPAWN_WIFEXITED(status) WIFEXITED(status) /**< non-zero if the child exited normally */
# define SPAWN_WEXITSTATUS(status) WEXITSTATUS(status) /**< exit status of a child if exited normally */
# define SPAWN_WIFSIGNALED(status) WIFSIGNALED(status) /**< non-zero if the child exited due to signal */
#endif
G_BEGIN_DECLS
gboolean spawn_check_command(const gchar *command_line, gboolean execute, GError **error);
gboolean spawn_kill_process(GPid pid, GError **error);
gboolean spawn_async(const gchar *working_directory, const gchar *command_line, gchar **argv,
gchar **envp, GPid *child_pid, GError **error);
/** Flags passed to @c spawn_with_callbacks(), which see. */
typedef enum
{
SPAWN_ASYNC = 0x00, /**< Asynchronous execution [default]. */
SPAWN_SYNC = 0x01, /**< Synchronous execution. */
/* buffering modes */
SPAWN_LINE_BUFFERED = 0x00, /**< stdout/stderr are line buffered [default]. */
SPAWN_STDOUT_UNBUFFERED = 0x02, /**< stdout is not buffered. */
SPAWN_STDERR_UNBUFFERED = 0x04, /**< stderr is not buffered. */
SPAWN_UNBUFFERED = 0x06, /**< stdout/stderr are not buffered. */
/* recursive modes */
SPAWN_STDIN_RECURSIVE = 0x08, /**< The stdin callback is recursive. */
SPAWN_STDOUT_RECURSIVE = 0x10, /**< The stdout callback is recursive. */
SPAWN_STDERR_RECURSIVE = 0x20, /**< The stderr callback is recursive. */
SPAWN_RECURSIVE = 0x38 /**< All callbacks are recursive. */
} SpawnFlags;
/**
* Specifies the type of function passed to @c spawn_with_callbacks() as stdout or stderr
* callback.
*
* In unbuffered mode, the @a string may contain nuls, while in line buffered mode, it may
* contain only a single nul as a line termination character at @a string->len - 1. In all
* cases, the @a string will be terminated with a nul character that is not part of the data
* at @a string->len.
*
* If @c G_IO_IN or @c G_IO_PRI are set, the @a string will contain at least one character.
*
* @param string contains the child data if @c G_IO_IN or @c G_IO_PRI are set.
* @param condition the I/O condition which has been satisfied.
* @param data the passed to @c spawn_with_callbacks() with the callback.
*/
typedef void (*SpawnReadFunc)(GString *string, GIOCondition condition, gpointer data);
gboolean spawn_with_callbacks(const gchar *working_directory, const gchar *command_line,
gchar **argv, gchar **envp, SpawnFlags spawn_flags, GIOFunc stdin_cb, gpointer stdin_data,
SpawnReadFunc stdout_cb, gpointer stdout_data, gsize stdout_max_length,
SpawnReadFunc stderr_cb, gpointer stderr_data, gsize stderr_max_length,
GChildWatchFunc exit_cb, gpointer exit_data, GPid *child_pid, GError **error);
/**
* A simple structure used by @c spawn_write_data() to write data to a channel.
* See @c spawn_write_data() for more information.
*/
typedef struct _SpawnWriteData
{
const gchar *ptr; /**< Pointer to the data. May be NULL if the size is 0. */
gsize size; /**< Size of the data. */
} SpawnWriteData;
gboolean spawn_write_data(GIOChannel *channel, GIOCondition condition, SpawnWriteData *data);
gboolean spawn_sync(const gchar *working_directory, const gchar *command_line, gchar **argv,
gchar **envp, SpawnWriteData *stdin_data, GString *stdout_data, GString *stderr_data,
gint *exit_status, GError **error);
G_END_DECLS
#endif /* GEANY_SPAWN_H */
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| gtkdoc | Folder | 0755 |
|
|
| scintilla | Folder | 0755 |
|
|
| tagmanager | Folder | 0755 |
|
|
| app.h | File | 1.84 KB | 0644 |
|
| build.h | File | 5.39 KB | 0644 |
|
| dialogs.h | File | 2.82 KB | 0644 |
|
| document.h | File | 11.23 KB | 0644 |
|
| editor.h | File | 10.45 KB | 0644 |
|
| encodings.h | File | 3.54 KB | 0644 |
|
| filetypes.h | File | 6.74 KB | 0644 |
|
| geany.h | File | 2.66 KB | 0644 |
|
| geanyfunctions.h | File | 1.06 KB | 0644 |
|
| geanyplugin.h | File | 1.71 KB | 0644 |
|
| gtkcompat.h | File | 1.19 KB | 0644 |
|
| highlighting.h | File | 2.2 KB | 0644 |
|
| keybindings.h | File | 14.85 KB | 0644 |
|
| main.h | File | 2.15 KB | 0644 |
|
| msgwindow.h | File | 3.18 KB | 0644 |
|
| navqueue.h | File | 1.39 KB | 0644 |
|
| plugindata.h | File | 18.79 KB | 0644 |
|
| pluginutils.h | File | 2.74 KB | 0644 |
|
| prefs.h | File | 2.01 KB | 0644 |
|
| project.h | File | 2.57 KB | 0644 |
|
| sciwrappers.h | File | 10.81 KB | 0644 |
|
| search.h | File | 4.09 KB | 0644 |
|
| spawn.h | File | 4.49 KB | 0644 |
|
| stash.h | File | 3.87 KB | 0644 |
|
| support.h | File | 1.51 KB | 0644 |
|
| symbols.h | File | 1.87 KB | 0644 |
|
| templates.h | File | 2.57 KB | 0644 |
|
| toolbar.h | File | 1.83 KB | 0644 |
|
| ui_utils.h | File | 11.35 KB | 0644 |
|
| utils.h | File | 11.13 KB | 0644 |
|