You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,8 +71,11 @@ pyshell.on('message', function (message) {
71
71
});
72
72
73
73
// end the input stream and allow the process to exit
74
-
pyshell.end(function (err) {
74
+
pyshell.end(function (err,code,signal) {
75
75
if (err) throw err;
76
+
console.log('The exit code was: '+ code);
77
+
console.log('The exit signal was: '+ signal);
78
+
console.log('finished');
76
79
console.log('finished');
77
80
});
78
81
```
@@ -209,9 +212,9 @@ Parses incoming data from the Python script written via stdout and emits `messag
209
212
210
213
Closes the stdin stream, allowing the Python script to finish and exit. The optional callback is invoked when the process is terminated.
211
214
212
-
#### `.terminate()`
215
+
#### `.terminate(signal)`
213
216
214
-
Terminates the python script, the optional end callback is invoked if specified.
217
+
Terminates the python script, the optional end callback is invoked if specified. A kill signal may be provided by `signal`, if `signal` is not specified SIGTERM is sent.
0 commit comments