Skip to content

Add LocalDetachedExecutor#249

Merged
bruno-f-cruz merged 2 commits into
mainfrom
feat-detached-executor
May 15, 2026
Merged

Add LocalDetachedExecutor#249
bruno-f-cruz merged 2 commits into
mainfrom
feat-detached-executor

Conversation

@bruno-f-cruz
Copy link
Copy Markdown
Member

Adds LocalDetachedExecutor, a fire-and-forget Executor implementation that spawns a subprocess via subprocess.Popen and returns immediately without waiting for it to complete.

Design:

  • Implements the existing Executor protocol — no new interface required
  • stdout/stderr redirected to DEVNULL (no dangling pipe handles)
  • shell=False enforced
  • Returns a placeholder CommandResult(stdout=None, stderr=None, exit_code=0) immediately; callers must not rely on it to reflect actual process outcome
  • Exported from clabe.apps

Usage:

from clabe.apps import LocalDetachedExecutor

executor = LocalDetachedExecutor()
executor.run(app.command)  # spawns process, returns immediately

@bruno-f-cruz bruno-f-cruz merged commit 3657c0d into main May 15, 2026
6 checks passed
@bruno-f-cruz bruno-f-cruz deleted the feat-detached-executor branch May 15, 2026 02:44
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

Successfully merging this pull request may close these issues.

1 participant