Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xprop zombie processes #323

Open
ces42 opened this issue Mar 19, 2023 · 0 comments
Open

xprop zombie processes #323

ces42 opened this issue Mar 19, 2023 · 0 comments

Comments

@ces42
Copy link

ces42 commented Mar 19, 2023

Describe the bug
This extension does not reap the xprop processes used to remove decorations from maximized or tiled window.

To Reproduce
Steps to reproduce the behavior:

  1. Set the "Hide window titlebars" to "maximixed".
  2. Maximized and unmaximize a window a couple of times
  3. Check htop for xprop zombie processes

Expected behavior
The extension should ensure that xprop processes are reaped

Environment (please complete the following information):

  • OS: Ubuntu 22.10
  • GNOME Shell 43.1
  • Unite 70

Additional context
The xprop process is started in

Util.spawn(['xprop', '-id', xid, '-f', hint, '32c', '-set', hint, value])
and it turns out that gnome's Util.spawn adds the DO_NOT_REAP_CHILD flag when starting a process (see here). Further down in that function an exit handler is attached for the process, which I think is supposed to take care of reaping the child? But maybe what's happening is that the xprop process finishes before the handler is attached?

A possible fix here might be to just directly call

GLib.spawn_async(null,
                 ['xprop', '-id', xid, '-f', hint, '32c', '-set', hint, value],
                 null,
                 GLib.SpawnFlags.SEARCH_PATH,
                 () => {
                    try {
                        global.context.restore_rlimit_nofile();
                    } catch (err) {
                    }
                 }
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant