Skip to content

Problem: when you "Stop" a bash/powershell script only the top process is stopped #3512

@AndrewSav

Description

@AndrewSav

Issue

It's quite forseeable that your script use other native executables to accomplish what you need to do. Those executable can have children of their own. When we stop a task that is running a script, only the script itself is stopped, all the childern contine running in the background.

Impact

Other

Installation method

Docker

Database

Postgres

Browser

Chrome

Semaphore Version

2.16.45

Ansible Version

Available upon request, but does not seem to be relevant

Logs & errors

Available upon request, but it seems there is nothing relevant there.

Manual installation - system information

N/A

Configuration

Availabile upon request. Seems irrelevant to the issue.

Additional information

I had a brief look at the source code, and it does not appear that it attempts to kill proces group / children. If the process locks some resource remote, or local, then the fact that it does not die is a big issue. For example if it keeps a port open, then no subsequent task execution can succed if they are using the same port.

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