Compare commits

...

1 Commits

Author SHA1 Message Date
yo
c807d95b21 BUGFIX: Allocate tmp once 2024-03-31 16:52:10 +02:00

View File

@ -46,9 +46,9 @@ func cmdStdin(commandline []string, input <-chan string) {
// stdout displaying thread
go func() {
// FIXME
tmp := make([]byte, 1024)
for {
// FIXME
tmp := make([]byte, 1024)
_, err := stdout.Read(tmp)
if len(bytes.Trim(tmp, "\x00")) > 0 {
for _, line := range strings.Split(strings.ReplaceAll(string(bytes.Trim(tmp, "\x00")), "\r\n", "\n"), "\n") {