Skip to content

resume (fg) from suspend (^Z) doesn't work inside a shell script #889

@nbuwe

Description

@nbuwe
Description:

If an urwid app is started from a shell script wrapper and is suspended with ^Z, when you try to resume the script/app with fg, the shell script wrapper is resumed, but the urwid app is still in the stopped state.

Affected versions (if applicable)
  • master branch (specify commit)
  • Latest stable version from pypi
  • Other (specify source)

Seems to have been broken between 2.1.2 and 2.2.0

Steps to reproduce (if applicable)
$ python -m venv ~/.local/urwid
$ PATH=$HOME/.local/urwid/bin:$PATH
$ pip install urwid
$ cd examples
$ python browse.py
^Z
$ fg
... works ...

but

$ echo 'python "$@"' > runme.sh
$ sh runme.sh browse.py
^Z
$ fg
... no display ...

You can check the process state from another terminal, and the python process will be in the stopped state.

At this stage you can ^Z and fg it again, and it will get resumed the second time round.

Expected/actual outcome

fg resumes an urwid app launched from a wrapper script every time, not every other time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions