Commit 5824522
child_process: add shell option to spawn()
This commit adds a shell option, to spawn() and spawnSync(). This
option allows child processes to be spawned with or without a
shell. The option also allows a custom shell to be defined, for
compatibility with exec()'s shell option.
Fixes: #1009
PR-URL: #4598
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 30d60cf commit 5824522Copy full SHA for 5824522
File tree
Expand file treeCollapse file tree
4 files changed
+144
-29
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- test/parallel
Expand file treeCollapse file tree
4 files changed
+144
-29
lines changedOpen diff view settings
Collapse file
+14-5Lines changed: 14 additions & 5 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
77 | 77 | |
78 | 78 | |
79 | 79 | |
80 | | - |
81 | | - |
82 | | - |
83 | | - |
84 | | - |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
85 | 86 | |
86 | 87 | |
87 | 88 | |
| ||
303 | 304 | |
304 | 305 | |
305 | 306 | |
| 307 | + |
| 308 | + |
| 309 | + |
| 310 | + |
306 | 311 | |
307 | 312 | |
308 | 313 | |
| ||
635 | 640 | |
636 | 641 | |
637 | 642 | |
| 643 | + |
| 644 | + |
| 645 | + |
| 646 | + |
638 | 647 | |
639 | 648 | |
640 | 649 | |
|
Collapse file
+29-24Lines changed: 29 additions & 24 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
71 | 71 | |
72 | 72 | |
73 | 73 | |
74 | | - |
| 74 | + |
| 75 | + |
75 | 76 | |
76 | 77 | |
77 | 78 | |
| ||
81 | 82 | |
82 | 83 | |
83 | 84 | |
84 | | - |
85 | | - |
86 | | - |
87 | | - |
88 | | - |
89 | | - |
90 | | - |
91 | | - |
92 | | - |
93 | | - |
94 | | - |
95 | | - |
96 | | - |
97 | | - |
| 85 | + |
| 86 | + |
| 87 | + |
98 | 88 | |
99 | 89 | |
100 | | - |
101 | | - |
102 | | - |
| 90 | + |
103 | 91 | |
104 | 92 | |
105 | 93 | |
| ||
109 | 97 | |
110 | 98 | |
111 | 99 | |
112 | | - |
113 | 100 | |
114 | 101 | |
115 | 102 | |
| ||
123 | 110 | |
124 | 111 | |
125 | 112 | |
126 | | - |
| 113 | + |
| 114 | + |
127 | 115 | |
128 | 116 | |
129 | 117 | |
| ||
153 | 141 | |
154 | 142 | |
155 | 143 | |
| 144 | + |
156 | 145 | |
157 | 146 | |
158 | 147 | |
| ||
331 | 320 | |
332 | 321 | |
333 | 322 | |
334 | | - |
| 323 | + |
| 324 | + |
| 325 | + |
| 326 | + |
| 327 | + |
| 328 | + |
| 329 | + |
| 330 | + |
| 331 | + |
| 332 | + |
| 333 | + |
| 334 | + |
| 335 | + |
| 336 | + |
| 337 | + |
| 338 | + |
| 339 | + |
335 | 340 | |
336 | 341 | |
337 | 342 | |
| ||
492 | 497 | |
493 | 498 | |
494 | 499 | |
495 | | - |
| 500 | + |
496 | 501 | |
497 | 502 | |
498 | 503 | |
499 | | - |
500 | | - |
| 504 | + |
| 505 | + |
501 | 506 | |
502 | 507 | |
503 | 508 | |
|
Collapse file
test/parallel/test-child-process-spawn-shell.js
Copy file name to clipboard+64Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
Collapse file
test/parallel/test-child-process-spawnsync-shell.js
Copy file name to clipboard+37Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
0 commit comments