Skip to content

Commit 0ed5f54

Browse files
committed
Updated readme
1 parent db1cd11 commit 0ed5f54

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ pyshell.on('message', function (message) {
7171
});
7272

7373
// end the input stream and allow the process to exit
74-
pyshell.end(function (err) {
74+
pyshell.end(function (err,code,signal) {
7575
if (err) throw err;
76+
console.log('The exit code was: ' + code);
77+
console.log('The exit signal was: ' + signal);
78+
console.log('finished');
7679
console.log('finished');
7780
});
7881
```
@@ -209,9 +212,9 @@ Parses incoming data from the Python script written via stdout and emits `messag
209212

210213
Closes the stdin stream, allowing the Python script to finish and exit. The optional callback is invoked when the process is terminated.
211214

212-
#### `.terminate()`
215+
#### `.terminate(signal)`
213216

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.
215218

216219
#### event: `message`
217220

0 commit comments

Comments
 (0)