Tiny Core Extensions > TCE Bugs

[Solved] in havoc terminal emulator: yes causes broken pipes

<< < (5/8) > >>

GNUser:
Hi jazzbiker and Rich. Thank you. It's good to have more than one workaround.

But I confess I'm no closer to understanding the root problem.


--- Quote from: jazzbiker on October 28, 2023, 04:00:50 PM ---Looks like it is havoc's fail cause it leaves the shell without the SIGPIPE handler.

--- End quote ---
I'm not sure it is havoc's fault. The developer tried hard but was unable to reproduce the issue. See here:
https://github.com/ii8/havoc/issues/50#issuecomment-1783859048

Rich:
Hi GNUser
Quote from https://github.com/ii8/havoc/issues/50#issuecomment-1783907710

--- Quote ---In havoc, ls | sort and all other pipelines work fine. Strangely, the problem seems limited to pipelines containing yes command. ...
--- End quote ---
Nothing strange about it:

--- Code: ---yes "password" | bcrypt somefile
--- End code ---
yes  starts writing  "password"s  to the pipe (FIFO).
bcrypt  reads the first  "password"  and then the second one to confirm.
bcrypt  encrypts the file and then exits.
When  bcrypt  exits, the pipe gets destroyed.
When  yes  attempts the next write, it encounters a write error and terminates.

The way to stop  yes  is to terminate it with Ctrl-C, kill, break the pipe, etc.
The broken pipe is the normal way to terminate  yes , not an error in this case.

GNUser:
Hi Rich. I can follow all of that and it makes perfect sense. What I'm trying to understand is why these "broken pipe" messages only appear in terminal emulators on TCL in wayland session. Here is the situation:

console on TCL: no error
terminal emulator on TCL in X session: no error
terminal emulator on other distro in wayland session (per havoc's developer): no error
terminal emulator on TCL in wayland session: error

GNUser:

--- Quote from: Rich on October 28, 2023, 08:06:27 PM ---When  bcrypt  exits, the pipe gets destroyed.
When  yes  attempts the next write, it encounters a write error and terminates.

--- End quote ---
That's not what I'm seeing.  yes  is not exiting and enters an infinite loop after bcrypt gets the two lines it needs, driving CPU usage up and turning on my laptop's fans. Pressing Control+c does not stop the infinite loop. Only way to stop the infinite loop is to close the terminal emulator window:


--- Code: ---$ echo "this is a test" >test.txt
$ yes "password" | bcrypt test.txt
Encryption key:
Again:
^C^C^C^C^C^C^C^C^C^C^C^C^C^C[laptop fans start running here, I close terminal emulator window, cpu usage goes down, fans stop]
--- End code ---

Rich:
Hi GNUser
Forgot about the infinite loop case. No idea about that.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version