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
In launching st-util as a child process on Windows, when the board is connected and st-util is in server/long-running mode, the parent process can't seem to be able to get any output from stdout and stderr from pipe. This is tested to be happening with NodeJS and Python 3. However when the board is not plugged in and st-util exits with error, the parent process is then able to catch output from pipes.
This is weird and troublesome since we won't be able to do output validation on st-util.
Example NodeJS script:
function log_child(proc_path: string, args: [string]) {
let p = spawn(proc_path, args);
p.stdout.on("data", (data) => {
console.log(`[child:stdout]${data.toString()}`);
});
p.stderr.on("data", (data) => {
let str = data.toString();
console.log(`[child:stderr]${str}`);
});
}
promise_child("st-util.exe", [""]);
Expected/description:
Expected things like:
[child:stdout]st-util 1.3.1
[child:stderr]2018-02-08T16:54:42 INFO src\common.c: Loading device parameters....
[child:stderr]2018-02-08T16:54:42 INFO src\common.c: Device connected is: L4 device, id 0x10076415
[child:stderr]2018-02-08T16:54:42 INFO src\common.c: SRAM size: 0x18000 bytes (96 KiB), Flash: 0x100000 bytes (1024 KiB) in pages of 2048 bytes
[child:stderr]2018-02-08T16:54:42 INFO src\gdbserver\gdb-server.c: Chip ID is 00000415, Core ID is 2ba01477.
[child:stderr]2018-02-08T16:54:42 INFO src\gdbserver\gdb-server.c: Listening at *:4242...
but gets nothing.
The text was updated successfully, but these errors were encountered:
john5f35
changed the title
[Windows] Can not get piped output
[st-util] Can not get piped output on Windows
Feb 8, 2018
st-util
In launching
st-util
as a child process on Windows, when the board is connected andst-util
is in server/long-running mode, the parent process can't seem to be able to get any output fromstdout
andstderr
from pipe. This is tested to be happening with NodeJS and Python 3. However when the board is not plugged in andst-util
exits with error, the parent process is then able to catch output from pipes.This is weird and troublesome since we won't be able to do output validation on
st-util
.Example NodeJS script:
Expected/description:
Expected things like:
but gets nothing.
The text was updated successfully, but these errors were encountered: