please icon indicating copy to clipboard operation
please copied to clipboard

Build hangs but works fine in --shell mode / SIGTOU hang

Open adox opened this issue 2 months ago • 0 comments

I've been using please to build some project with maven and encountered freeze during the build. Reapplying same commands when in --shell mode worked fine (no freeze). Dig up a little bit and it looks like the freeze happend because of background process touches the controlling TTY.

Run this script to reproduce:

#!/usr/bin/env bash
set -euo pipefail

echo "Starting..."

# background job + ioctl on real TTY
( stty -echo </dev/tty; echo "you should NOT see this")

echo "Done"

it runs perfectly fine in plain shell and in please with --shell, but hangs when running with please.

Found this when debugging with strace: ioctl(0, TCSETSW, ...) -> SIGTOU -> stopped

My workaround was to set TERM=dumb and multiple other options to force mvn not to try tricks on the output (ie setting colors).

adox avatar Oct 26 '25 11:10 adox