GaloisInc / saw-script

The SAW scripting language.
BSD 3-Clause "New" or "Revised" License
437 stars 63 forks source link

SAW should respond to SIGINFO #2143

Open sauclovian-g opened 3 hours ago

sauclovian-g commented 3 hours ago

There's a little-known/little-used feature of Unix ttys where typing ^T sends SIGINFO to the foreground process, which is a request for it to tell you what it's doing.

It's helpful for terminal-based things that can be long-running to respond by printing what they're doing; this is often sufficient to decide whether they're making progress or not and whether to kill them.

It may be difficult to implement this usefully for SAW because of the complicated and messy rules about what you can do in a signal handler, but if it's reasonably feasible it would be nice to have.

sauclovian-g commented 3 hours ago

For example one could print the interpreter's execution context (function and stack trace), plus for some of the internal operations what stage it's in, plus if we're waiting for an external process (like a solver) what process it is and how long since it was started.