Detecting SIGINT in Console process

I have a xojo console tool which is being run as a child from within a Swift Process.

The Swift Process has two ways of terminating the child:
https://developer.apple.com/documentation/foundation/process

  • terminate - which sends SIGTERM
  • interrupt - which sends SIGINT

Is it possible to detect these from within the Xojo console app?

You can use SignalHandlerMBS class in MBS Xojo Util Plugin.

Yes!

See the solution in Feedback here:

feedback://showreport?report_id=2332

1 Like

That works, thanks!

Of note, the signal handler function must be a global method; I tried to make it a method on the Application class, but that would crash in RuntimeUnlockObject.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.