kareman / SwiftShell

A Swift framework for shell scripting.
https://kareman.github.io/SwiftShell
MIT License
1.03k stars 87 forks source link

process.terminate() has not been implemented on Linux #59

Closed Ponyboy47 closed 6 years ago

Ponyboy47 commented 6 years ago

I'm receiving this error calling command.stop() on Linux:

Fatal error: terminate() is not yet implemented: file Foundation/Process.swift, line 464

I'll make the pull request, but would you recommend marking it as unavailable on Linux with:

@available(Linux, unavailable, message: "The terminate() function has not been implemented on Linux")

or to use a compiler flag:

#if os(macOS)
...
#endif
kareman commented 6 years ago

Yes, Foundation on Linux has a lot of catching up to do. I think it would be best to mark it as unavailable, as that should provide better error messages when trying to use the method on Linux.