Skip to content

mate-screenshot orphans subprocess tree after closing #391

Description

@thanatos

Steps to Reproduce

  1. Run mate-screenshot --window. That will create a process tree something like the following:

    /bin/zsh
    └─ mate-screenshot --window
       └─ mate-screenshot --window
          └─ bwrap --unshare-all --die-with-parent --chdir / --ro-bind /usr /usr --dev /dev --ro-bind-try
             └─ bwrap --unshare-all --die-with-parent --chdir / --ro-bind /usr /usr --dev /dev --ro-bind-
                └─ /usr/lib/glycin-loaders/2+/glycin-image-rs --dbus-fd 28
    
  2. Close the window that appears / close/quit mate-screenshot

  3. The subprocess tree still exists:

    /sbin/init
    ⁞
    ├─ mate-screenshot --window
    │  └─ bwrap --unshare-all --die-with-parent --chdir / --ro-bind /usr /usr 
    │     └─ bwrap --unshare-all --die-with-parent --chdir / --ro-bind /usr /u
    │        └─ /usr/lib/glycin-loaders/2+/glycin-image-rs --dbus-fd 28
    

    While the main process appears to have exited, the subprocess it spawned has been reparented to init, and appears to run indefinitely, leaking 4 processes and the associated RAM & other resources.

Expected Behavior

mate-screenshot does not orphan/leak child processes.

Actual Behavior

mate-screenshot orphans a child process.

Error Output

Version

mate-screenshot 1.28.0

Distribution

Arch Linux

Additional Context

No response

Reproducibility

Every time

Checklist

  • I have searched existing issues to avoid duplicates
  • I have provided all the requested information above

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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