# \[Pitch\] Swift Subprocess

**URL:** <https://forums.swift.org/t/pitch-swift-subprocess/69805>\
**Category:** Foundation\
**Created:** [February 2, 2024, 9:38pm UTC](https://forums.swift.org/t/pitch-swift-subprocess/69805 "2024-02-02T21:38:47Z")\
**Posts on this page:** 1\
**Showing post:** 43

<div class="post-metadata">

**Author:** ![icharleshu](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/icharleshu/32/20905_2.png) [@icharleshu](https://forums.swift.org/u/icharleshu)\
**Post date:** [February 18, 2024, 3:06am UTC](https://forums.swift.org/t/pitch-swift-subprocess/69805/43 "2024-02-18T03:06:45Z")

</div>

> [@ksluder](#):
>
> It’s akin to saying that any tasks

This is the distinction I was trying to draw: process and tasks are fundamentally different. One is a construct defined by Swift structural concurrency, which concerns undefined behavior due to overlapping exclusive/exclusive or exclusive/non-exclusive accesses _within a process_; one is _the process_ itself, which is out side of realm of swift structural concurrency (most likely outside of Swift itself too since `Subprocess` launches any process, not just processes written in Swift). Therefore I disagree with the comparison here.

It's okay for us to decide that functionally and conceptually speaking it makes the most sense to terminate the subprocess when the parent process goes out of scope for this API. I'm simply disagreeing with the notion that "this should be done because Swift structural concurrency dictated so"

---

_[View the full topic](https://forums.swift.org/t/pitch-swift-subprocess/69805)._
