diff options
author | Werner Koch <[email protected]> | 2024-06-19 07:23:47 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2024-06-19 07:23:47 +0000 |
commit | 0078afb8c60af2c61c01688ca52f51ca95b25721 (patch) | |
tree | 9f9e617c7c70928c2c77498a9a717b4aa4a235f5 /src/spawn-w32.c | |
parent | Apply spell fix. (diff) | |
download | libgpg-error-0078afb8c60af2c61c01688ca52f51ca95b25721.tar.gz libgpg-error-0078afb8c60af2c61c01688ca52f51ca95b25721.zip |
spawn: Keep struct definitions at the top of the file.
* src/spawn-posix.c: Move include and struct defs around.
* src/spawn-w32.c: Move struct defs around.
Diffstat (limited to 'src/spawn-w32.c')
-rw-r--r-- | src/spawn-w32.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/src/spawn-w32.c b/src/spawn-w32.c index 0e6b77d..e6ce28f 100644 --- a/src/spawn-w32.c +++ b/src/spawn-w32.c @@ -67,6 +67,30 @@ #define handle_to_fd(a) ((intptr_t)(a)) +/* Definition for the gpgrt_spawn_actions_t. Note that there is a + * different one for Unices. */ +struct gpgrt_spawn_actions { + void *hd[3]; + void **inherit_hds; + char *env; +}; + + +/* Definition for the gpgrt_process_t. Note that there is a different + * one for Unices. */ +struct gpgrt_process { + const char *pgmname; + unsigned int terminated:1; /* or detached */ + unsigned int flags; + HANDLE hProcess; + HANDLE hd_in; + HANDLE hd_out; + HANDLE hd_err; + int exitcode; +}; + + + /* Return the maximum number of currently allowed open file * descriptors. Only useful on POSIX systems but returns a value on * other systems too. */ @@ -301,22 +325,6 @@ _gpgrt_make_pipe (int filedes[2], estream_t *r_fp, int direction, int nonblock) return do_create_pipe_and_estream (filedes, NULL, 0, 0); } -struct gpgrt_spawn_actions { - void *hd[3]; - void **inherit_hds; - char *env; -}; - -struct gpgrt_process { - const char *pgmname; - unsigned int terminated :1; /* or detached */ - unsigned int flags; - HANDLE hProcess; - HANDLE hd_in; - HANDLE hd_out; - HANDLE hd_err; - int exitcode; -}; /* * Check if STARTUPINFOEXW supports PROC_THREAD_ATTRIBUTE_HANDLE_LIST. |