Classes | Macros | Typedefs | Functions | Variables
win/process.c File Reference
#include <assert.h>
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <limits.h>
#include <wchar.h>
#include <malloc.h>
#include "uv.h"
#include "internal.h"
#include "handle-inl.h"
#include "req-inl.h"
Include dependency graph for win/process.c:

Go to the source code of this file.

Classes

struct  env_var
 

Macros

#define E_V(str)   { L##str, L##str L"=", sizeof(str) }
 
#define SIGKILL   9
 

Typedefs

typedef struct env_var env_var_t
 

Functions

int env_strncmp (const wchar_t *a, int na, const wchar_t *b)
 
static void CALLBACK exit_wait_callback (void *data, BOOLEAN didTimeout)
 
static WCHAR * find_path (WCHAR *env)
 
int make_program_args (char **args, int verbatim_arguments, WCHAR **dst_ptr)
 
int make_program_env (char *env_block[], WCHAR **dst_ptr)
 
static WCHAR * path_search_walk_ext (const WCHAR *dir, size_t dir_len, const WCHAR *name, size_t name_len, WCHAR *cwd, size_t cwd_len, int name_has_ext)
 
static int qsort_wcscmp (const void *a, const void *b)
 
WCHAR * quote_cmd_arg (const WCHAR *source, WCHAR *target)
 
static WCHAR * search_path (const WCHAR *file, WCHAR *cwd, const WCHAR *path)
 
static WCHAR * search_path_join_test (const WCHAR *dir, size_t dir_len, const WCHAR *name, size_t name_len, const WCHAR *ext, size_t ext_len, const WCHAR *cwd, size_t cwd_len)
 
static void uv__init_global_job_handle (void)
 
static int uv__kill (HANDLE process_handle, int signum)
 
int uv_kill (int pid, int signum)
 
void uv_process_close (uv_loop_t *loop, uv_process_t *handle)
 
void uv_process_endgame (uv_loop_t *loop, uv_process_t *handle)
 
static void uv_process_init (uv_loop_t *loop, uv_process_t *handle)
 
int uv_process_kill (uv_process_t *process, int signum)
 
void uv_process_proc_exit (uv_loop_t *loop, uv_process_t *handle)
 
int uv_spawn (uv_loop_t *loop, uv_process_t *process, const uv_process_options_t *options)
 
static int uv_utf8_to_utf16_alloc (const char *s, WCHAR **ws_ptr)
 

Variables

static const env_var_t required_vars []
 
static HANDLE uv_global_job_handle_
 
static uv_once_t uv_global_job_handle_init_guard_ = UV_ONCE_INIT
 

Macro Definition Documentation

◆ E_V

#define E_V (   str)    { L##str, L##str L"=", sizeof(str) }

Definition at line 46 of file win/process.c.

◆ SIGKILL

#define SIGKILL   9

Definition at line 37 of file win/process.c.

Typedef Documentation

◆ env_var_t

typedef struct env_var env_var_t

Function Documentation

◆ env_strncmp()

int env_strncmp ( const wchar_t *  a,
int  na,
const wchar_t *  b 
)

Definition at line 616 of file win/process.c.

◆ exit_wait_callback()

static void CALLBACK exit_wait_callback ( void *  data,
BOOLEAN  didTimeout 
)
static

Definition at line 849 of file win/process.c.

◆ find_path()

static WCHAR* find_path ( WCHAR *  env)
static

Definition at line 831 of file win/process.c.

◆ make_program_args()

int make_program_args ( char **  args,
int  verbatim_arguments,
WCHAR **  dst_ptr 
)

Definition at line 526 of file win/process.c.

◆ make_program_env()

int make_program_env ( char *  env_block[],
WCHAR **  dst_ptr 
)

Definition at line 682 of file win/process.c.

◆ path_search_walk_ext()

static WCHAR* path_search_walk_ext ( const WCHAR *  dir,
size_t  dir_len,
const WCHAR *  name,
size_t  name_len,
WCHAR *  cwd,
size_t  cwd_len,
int  name_has_ext 
)
static

Definition at line 255 of file win/process.c.

◆ qsort_wcscmp()

static int qsort_wcscmp ( const void *  a,
const void *  b 
)
static

Definition at line 659 of file win/process.c.

◆ quote_cmd_arg()

WCHAR* quote_cmd_arg ( const WCHAR *  source,
WCHAR *  target 
)

Definition at line 453 of file win/process.c.

◆ search_path()

static WCHAR* search_path ( const WCHAR *  file,
WCHAR *  cwd,
const WCHAR *  path 
)
static

Definition at line 340 of file win/process.c.

◆ search_path_join_test()

static WCHAR* search_path_join_test ( const WCHAR *  dir,
size_t  dir_len,
const WCHAR *  name,
size_t  name_len,
const WCHAR *  ext,
size_t  ext_len,
const WCHAR *  cwd,
size_t  cwd_len 
)
static

Definition at line 162 of file win/process.c.

◆ uv__init_global_job_handle()

static void uv__init_global_job_handle ( void  )
static

Definition at line 67 of file win/process.c.

◆ uv__kill()

static int uv__kill ( HANDLE  process_handle,
int  signum 
)
static

Definition at line 1189 of file win/process.c.

◆ uv_kill()

int uv_kill ( int  pid,
int  signum 
)

Definition at line 1256 of file win/process.c.

◆ uv_process_close()

void uv_process_close ( uv_loop_t loop,
uv_process_t handle 
)

Definition at line 903 of file win/process.c.

◆ uv_process_endgame()

void uv_process_endgame ( uv_loop_t loop,
uv_process_t handle 
)

Definition at line 924 of file win/process.c.

◆ uv_process_init()

static void uv_process_init ( uv_loop_t loop,
uv_process_t handle 
)
static

Definition at line 140 of file win/process.c.

◆ uv_process_kill()

int uv_process_kill ( uv_process_t process,
int  signum 
)

Definition at line 1238 of file win/process.c.

◆ uv_process_proc_exit()

void uv_process_proc_exit ( uv_loop_t loop,
uv_process_t handle 
)

Definition at line 865 of file win/process.c.

◆ uv_spawn()

int uv_spawn ( uv_loop_t loop,
uv_process_t process,
const uv_process_options_t options 
)

Definition at line 936 of file win/process.c.

◆ uv_utf8_to_utf16_alloc()

static int uv_utf8_to_utf16_alloc ( const char *  s,
WCHAR **  ws_ptr 
)
static

Definition at line 108 of file win/process.c.

Variable Documentation

◆ required_vars

const env_var_t required_vars[]
static
Initial value:
= {
E_V("HOMEDRIVE"),
E_V("HOMEPATH"),
E_V("LOGONSERVER"),
E_V("PATH"),
E_V("SYSTEMDRIVE"),
E_V("SYSTEMROOT"),
E_V("TEMP"),
E_V("USERDOMAIN"),
E_V("USERNAME"),
E_V("USERPROFILE"),
E_V("WINDIR"),
}

Definition at line 48 of file win/process.c.

◆ uv_global_job_handle_

HANDLE uv_global_job_handle_
static

Definition at line 63 of file win/process.c.

◆ uv_global_job_handle_init_guard_

uv_once_t uv_global_job_handle_init_guard_ = UV_ONCE_INIT
static

Definition at line 64 of file win/process.c.

E_V
#define E_V(str)
Definition: win/process.c:46


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:26