Do not try to interrupt/terminate a process if it isn't running (#5674)
Do not try to interrupt/terminate a process if it isn't running (#5674)

Calling these on a process that isn't currently running results in

```
'NSInvalidArgumentException', reason: '*** -[NSConcreteTask terminate]: task not launched'
```

so we should check first.

rdar://96964401
abertelrud/swift-package-manager,abertelrud/swift-package-manager,apple/swift-package-manager,apple/swift-package-manager,apple/swift-package-manager,apple/swift-package-manager,abertelrud/swift-package-manager,apple/swift-package-manager,abertelrud/swift-package-manager,abertelrud/swift-package-manager