Skip to content

feat(adb): add async process runner for executing commands (#4) - #40

Merged
SamratB8 merged 1 commit into
devfrom
feature/adb-process-runner
Jul 15, 2026
Merged

feat(adb): add async process runner for executing commands (#4)#40
SamratB8 merged 1 commit into
devfrom
feature/adb-process-runner

Conversation

@SamratB8

Copy link
Copy Markdown
Collaborator

Summary

Adds a reusable asynchronous process runner to WinDroid.Adb for safely executing external commands.

Changes

  • added ProcessRunner
  • added structured CommandResult
  • launches executables directly without a shell
  • passes arguments safely through ProcessStartInfo.ArgumentList
  • captures stdout and stderr concurrently
  • returns normal and non-zero exit codes
  • supports optional timeout
  • supports caller cancellation before or after process startup
  • terminates the child process tree on timeout or cancellation
  • uses bounded cleanup waits
  • returns structured startup failures
  • observes eventual faults from unfinished output-read tasks

Validation

  • Debug build: 0 warnings, 0 errors
  • Release build: 0 warnings, 0 errors
  • git diff --check: clean
  • scratch harness: 20/20 checks passed
  • concurrent 100 KB stdout/stderr test passed without deadlock
  • pre-cancelled token test confirmed the child process was never started
  • no orphaned test processes remained

No ADB command wrappers, adb devices parsing, UI work, dependency-injection setup, logging, or Issue #5 functionality were included.

Closes #4.

@SamratB8
SamratB8 merged commit ba14984 into dev Jul 15, 2026
2 checks passed
@SamratB8
SamratB8 deleted the feature/adb-process-runner branch July 15, 2026 15:50
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