- 
                Notifications
    You must be signed in to change notification settings 
- Fork 45
Open
Description
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
- Create new xcode project for mac SwiftUI app
- Add these codes, subprocess dependency and run
import SwiftUI
import Subprocess
struct ContentView: View {
    var body: some View {
        VStack {
            Image(systemName: "globe")
                .imageScale(.large)
                .foregroundStyle(.tint)
            Text("Hello, world!")
        }
        .task {
          let configuration = Configuration(
                      executable: .path("/bin/sleep"),
                      arguments: ["60"]
                  )
          let _ = try! await Subprocess.run(
              configuration,
              output: .discarded,
              error: .discarded
          ) { _ in
          }
        }
        .padding()
    }
}
- Open Activity Monitorapp and search for sleep process, sleep subprocess shows up.
- close mac app quickly
- sleep sub process became orphan, and quit after 60 seconds
 
Expected behavior
A clear and concise description of what you expected to happen.
sleep subprocess quit quickly after parent mac app exit
Environment (please complete the following information):
- OS [e.g. macOS 15]
 macOS 15
- Swift version (run swift --version) [e.g. swiftlang-6.2.0.1.23 clang-1700.3.1.3]
 swift-driver version: 1.120.5 Apple Swift version 6.1.2 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
 Target: arm64-apple-macosx15.0
 Additional context
 Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working