kareman/SwiftShell

process.terminate() has not been implemented on Linux

Ponyboy47 opened this issue · 1 comments

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

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.