I’m getting started with Swift scripting, and I’m seeing different behavior on macOS (swift 5.0.1) than on Raspbian (swift 5.1.5).
The script is:
#!/usr/bin/env swift import Foundation let perl = Process() perl.executableURL = URL( fileURLWithPath: "/usr/bin/perl" ) perl.arguments = ["-Mstrict", "-w", "-E", "say(1) && sleep 1 while 1"] try perl.run() perl.waitUntilExit()
When I CTRL-C that on Raspbian, the Perl subprocess stops. But when I CTRL-C it on macOS, the subprocess keeps going.
Does one platform move the subprocess to a different process group, or what would explain the difference?