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:

  • 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.


See the solution in Feedback here:


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.