Skip to content

Commit fa4eb47

Browse files
committed
bindings: add spawn_sync bindings
This implements a nested event loop that makes it possible to control a child process, while blocking the main loop until the process exits.
1 parent d58c206 commit fa4eb47

File tree

4 files changed

+1311
-0
lines changed

4 files changed

+1311
-0
lines changed

node.gyp

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
'src/pipe_wrap.cc',
105105
'src/signal_wrap.cc',
106106
'src/smalloc.cc',
107+
'src/spawn_sync.cc',
107108
'src/string_bytes.cc',
108109
'src/stream_wrap.cc',
109110
'src/tcp_wrap.cc',

src/env.h

+21
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ namespace node {
5353
// for the sake of convenience.
5454
#define PER_ISOLATE_STRING_PROPERTIES(V) \
5555
V(address_string, "address") \
56+
V(args_string, "args") \
5657
V(async_queue_string, "_asyncQueue") \
5758
V(async, "async") \
5859
V(atime_string, "atime") \
@@ -66,10 +67,13 @@ namespace node {
6667
V(close_string, "close") \
6768
V(code_string, "code") \
6869
V(ctime_string, "ctime") \
70+
V(cwd_string, "cwd") \
71+
V(detached_string, "detached") \
6972
V(dev_string, "dev") \
7073
V(disposed_string, "_disposed") \
7174
V(domain_string, "domain") \
7275
V(enter_string, "enter") \
76+
V(env_pairs_string, "envPairs") \
7377
V(errno_string, "errno") \
7478
V(error_string, "error") \
7579
V(exit_string, "exit") \
@@ -78,6 +82,8 @@ namespace node {
7882
V(ext_key_usage_string, "ext_key_usage") \
7983
V(family_string, "family") \
8084
V(fatal_exception_string, "_fatalException") \
85+
V(fd_string, "fd") \
86+
V(file_string, "file") \
8187
V(fingerprint_string, "fingerprint") \
8288
V(flags_string, "flags") \
8389
V(gid_string, "gid") \
@@ -86,12 +92,17 @@ namespace node {
8692
V(heap_size_limit_string, "heap_size_limit") \
8793
V(heap_total_string, "heapTotal") \
8894
V(heap_used_string, "heapUsed") \
95+
V(ignore_string, "ignore") \
8996
V(immediate_callback_string, "_immediateCallback") \
97+
V(inherit_string, "inherit") \
9098
V(ino_string, "ino") \
99+
V(input_string, "input") \
91100
V(ipv4_string, "IPv4") \
92101
V(ipv6_string, "IPv6") \
93102
V(issuer_string, "issuer") \
103+
V(kill_signal_string, "killSignal") \
94104
V(mark_sweep_compact_string, "mark-sweep-compact") \
105+
V(max_buffer_string, "maxBuffer") \
95106
V(message_string, "message") \
96107
V(method_string, "method") \
97108
V(mode_string, "mode") \
@@ -114,27 +125,35 @@ namespace node {
114125
V(onselect_string, "onselect") \
115126
V(onsignal_string, "onsignal") \
116127
V(onstop_string, "onstop") \
128+
V(output_string, "output") \
117129
V(path_string, "path") \
130+
V(pid_string, "pid") \
131+
V(pipe_string, "pipe") \
118132
V(port_string, "port") \
119133
V(processed_string, "processed") \
120134
V(rdev_string, "rdev") \
135+
V(readable_string, "readable") \
121136
V(rename_string, "rename") \
122137
V(rss_string, "rss") \
123138
V(scavenge_string, "scavenge") \
124139
V(serial_number_string, "serialNumber") \
125140
V(servername_string, "servername") \
126141
V(session_id_string, "sessionId") \
127142
V(should_keep_alive_string, "shouldKeepAlive") \
143+
V(signal_string, "signal") \
128144
V(size_string, "size") \
129145
V(smalloc_p_string, "_smalloc_p") \
130146
V(sni_context_err_string, "Invalid SNI context") \
131147
V(sni_context_string, "sni_context") \
132148
V(stack_string, "stack") \
133149
V(status_code_string, "statusCode") \
134150
V(status_message_string, "statusMessage") \
151+
V(status_string, "status") \
152+
V(stdio_string, "stdio") \
135153
V(subject_string, "subject") \
136154
V(subjectaltname_string, "subjectaltname") \
137155
V(syscall_string, "syscall") \
156+
V(timeout_string, "timeout") \
138157
V(timestamp_string, "timestamp") \
139158
V(tls_ticket_string, "tlsTicket") \
140159
V(total_heap_size_executable_string, "total_heap_size_executable") \
@@ -150,6 +169,8 @@ namespace node {
150169
V(version_major_string, "versionMajor") \
151170
V(version_minor_string, "versionMinor") \
152171
V(version_string, "version") \
172+
V(windows_verbatim_arguments_string, "windowsVerbatimArguments") \
173+
V(writable_string, "writable") \
153174
V(write_queue_size_string, "writeQueueSize") \
154175

155176
#define ENVIRONMENT_STRONG_PERSISTENT_PROPERTIES(V) \

0 commit comments

Comments
 (0)