Skip to content

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

@adox

Description

@adox

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions