Tiny Core Extensions > TCE Bugs
[Solved] in havoc terminal emulator: yes causes broken pipes
GNUser:
Hi patrikg. Yes, I have done an internet search.
Hi jazzbiker. I don't have coreutils loaded. The only yes on my system is the busybox applet.
curaga:
That stackoverflow link does look like the most likely explanation. IOW, it's a bug in those two terminals, havoc and weston terminal.
GNUser:
--- Quote from: curaga on October 27, 2023, 02:10:56 AM ---IOW, it's a bug in those two terminals, havoc and weston terminal.
--- End quote ---
Darn. In that case, I created this trivial wrapper script for yes, which does away with the errors when using tce-load:
--- Code: ---#!/bin/sh
exec /usr/bin/yes "$@" 2>/dev/null
--- End code ---
But that doesn't solve scripts where yes is needed multiple times in same pipeline. Even with the wrapper script, something like this:
--- Code: ---yes "password" | bcrypt somefile
--- End code ---
seems to enter an endless loop, driving CPU usage way up. Workaround for this situation is this kludge:
--- Code: ---i=1
while true; do
echo "password"
[ $i -eq 2 ] && break
i=$(( $i + 1 ))
done | bcrypt somefile
--- End code ---
If I figure out how to properly fix the bug in the terminal emulators, I'll post it here.
Juanito:
Why not file a bug report against weston or havoc?
Rich:
Hi GNUser
--- Quote from: GNUser on October 27, 2023, 10:17:52 AM --- ... But that doesn't solve scripts where yes is needed multiple times in same pipeline. Even with the wrapper script, something like this:
--- Code: ---yes "password" | bcrypt somefile
--- End code ---
seems to enter an endless loop, driving CPU usage way up. ...
--- End quote ---
What if you do it like this:
--- Code: ---echo -e "password\npassword" | bcrypt somefile
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version