Skip to content

xdotool leaves lots of defunct/zombie processes #56

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

Open
niawag opened this issue Oct 10, 2024 · 3 comments
Open

xdotool leaves lots of defunct/zombie processes #56

niawag opened this issue Oct 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@niawag
Copy link

niawag commented Oct 10, 2024

Hi and thanks for this great tool, I'm using it with xdotool to perform operation but I just noticed that each time I use an action the xdotool process stays running as a defunct process (that can't be killed). If I run the same command inside a terminal there is no defunct process left.
Am I the only one affected by this ? Do you know if there is a way to prevent that ?

Here is my config:

{
  "shape_button": "Right",
  "bindings": [
    {
      "comment": "refresh",
      "event": {
        "button": "Right",
        "event_type": "Shape",
        "shapes_xy": [
          [
            0,
            0,
            16,
            48,
            32,
            111,
            32,
            206,
            63,
            286,
            63,
            381,
            63,
            476,
            63,
            556,
            63,
            651,
            63,
            746,
            63,
            825,
            63,
            873,
            63,
            905,
            63,
            937,
            48,
            968,
            48,
            984,
            48,
            1000
          ]
        ]
      },
      "cmd_str": "xdotool key ctrl+r"
    },
    {
      "comment": "back",
      "event": {
        "button": "Right",
        "event_type": "Shape",
        "shapes_xy": [
          [
            1000,
            39,
            971,
            39,
            928,
            33,
            876,
            33,
            824,
            29,
            761,
            29,
            690,
            23,
            627,
            16,
            562,
            16,
            490,
            10,
            435,
            10,
            389,
            3,
            346,
            3,
            304,
            3,
            265,
            3,
            232,
            3,
            212,
            0,
            183,
            0,
            154,
            0,
            127,
            0,
            108,
            0,
            85,
            0,
            65,
            0,
            49,
            0,
            36,
            0,
            20,
            0,
            13,
            0,
            7,
            0,
            3,
            0,
            0,
            0,
            0,
            0
          ]
        ]
      },
      "cmd_str": "xdotool key alt+Left"
    },
    {
      "comment": "forward",
      "event": {
        "button": "Right",
        "event_type": "Shape",
        "shapes_xy": [
          [
            0,
            12,
            37,
            0,
            98,
            0,
            207,
            0,
            366,
            0,
            549,
            0,
            720,
            0,
            829,
            0,
            927,
            0,
            988,
            0,
            1000,
            0
          ]
        ]
      },
      "cmd_str": "xdotool key Alt+Right"
    },
    {
      "comment": "toggle volume",
      "event": {
        "button": "Middle",
        "modifiers": [
          "ShiftLeft"
        ],
        "event_type": "Click"
      },
      "cmd_str": "xdotool key --clearmodifiers XF86AudioMute"
    },
    {
      "comment": "volume up",
      "event": {
        "button": "WheelUp",
        "modifiers": [
          "ShiftLeft"
        ],
        "event_type": "Release"
      },
      "cmd_str": "xdotool key --clearmodifiers XF86AudioRaiseVolume"
    },
    {
      "comment": "volume down",
      "event": {
        "button": "WheelDown",
        "modifiers": [
          "ShiftLeft"
        ],
        "event_type": "Release"
      },
      "cmd_str": "xdotool key --clearmodifiers XF86AudioLowerVolume"
    }
  ]
}

I'm using it on Linux Mint 22 x64 with latest mouse-actions binary (0.4.5) with a systemd user service (that might be part of the problem):

[Unit]
Description=mouse-actions

[Service]
ExecStart=/pathto/mouse-actions start
ExecStop=/pathto/mouse-actions stop
ExecReload=/pathto/mouse-actions stop && /pathto/mouse-actions start

[Install]
WantedBy=graphical-session.target
@niawag
Copy link
Author

niawag commented Oct 11, 2024

I tried to run mouse-actions directly from terminal and I'm having the same problem of zombie processes

@niawag niawag changed the title xdotool leaves lots of defunct processes xdotool leaves lots of defunct/zombie processes Oct 11, 2024
@jersou
Copy link
Owner

jersou commented Oct 21, 2024

I confirm, I have the same bug, I'll try to figure out why

jersou added a commit that referenced this issue Oct 21, 2024
@jersou jersou added the bug Something isn't working label Oct 22, 2024
@Zefiro
Copy link

Zefiro commented Jan 6, 2025

Can confirm, same issue for me (Linux Mint 22)
the configured command goes in a state. I tried it with calling a bash script which in turn calls xdotool, and this correctly terminates xdotool, but now my script is .
Not sure what the impact on the system is if those accumulate every few seconds.

The defunct processes are cleaned up when mouse-action is terminated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants