Sub shl_StdOut (Buffer() As Byte, Length As Int)
Dim s As String = BytesToString(Buffer, 0, Length, "UTF8")
s = s.Replace(Chr(13), "") 'remove CR
Dim b() As Byte = s.GetBytes("UTF8")
Streams.Write(AddCommandToBytes(STDOUT, b, b.Length))
End Sub
Sub shl_StdErr (Buffer() As Byte, Length As Int)
Dim s As String = BytesToString(Buffer, 0, Length, "UTF8")
s = s.Replace(Chr(13), "")
Dim b() As Byte = s.GetBytes("UTF8")
Streams.Write(AddCommandToBytes(STDERR, b, b.Length))
End Sub