Catching Signals #751
Replies: 3 comments
-
It'd be cool to do what Python does an insert the hander for the given signal at the next point of execution on the VM but I haven't quite figured out how to do that. |
Beta Was this translation helpful? Give feedback.
-
Do you have some of the attempts on a repo somewhere? I'll take a look at them. Been a while since I've looked at the Dictu codebase admittedly so will need to refresh myself on it so not much use on hints as of yet but I'll try have a think of something! (sorry for slow replies) |
Beta Was this translation helpful? Give feedback.
-
I think I like this the most. Only thing I need to do is get a signal registered and insert the handler for that signal into the VM at the next point of execution. import Process;
import System;
def hello() {
print("handler called after catching signal!);
}
{ // main
Process.signalHandle(Process.SIGINT, hello);
System.sleep(10);
// ctrl c here...
System.exit(0);
} |
Beta Was this translation helpful? Give feedback.
-
I've been playing around with catching signals and different ways it can be done and I've hit a wall with each implementation. I wanted to get some feedback around this topic and possible suggestions on a decent path forward.
Beta Was this translation helpful? Give feedback.
All reactions