tessel / t1-runtime

[UNMAINTAINED] Tessel 1 JavaScript runtime.
Other
117 stars 33 forks source link

Convert stdout/stderr chunks to string (if not already) before logging #687

Closed natevw closed 9 years ago

natevw commented 9 years ago

It is not proper to pass a buffer directly into tm_log, this fixes a segfault when piping (or simply writing buffers) to process.stdout.

natevw commented 9 years ago

Wrong approach: the right fix would be to have tm_log support binary data (i.e. colony_toconstbuffer) — otherwise you can't pipe out binary data. Related: #319

tcr commented 9 years ago

lgtm!

tm-rampart commented 9 years ago

Approved by @natevw. Running tests.