I am trying to translate some C++ code to D to learn D.
And the first lines to translate are:
signal(SIGINT, (sighandler_t) shutdownClient);
signal(SIGTERM, (sighandler_t) shutdownClient);
So I come to try:
import std.stdio;
void main(){
try {
while (true) writeln("H1!!");
} finally writeln("oh... Bye then!");
}
Using 2.059 dmd on Windows.
I expected the "ob... Bye then!" to show up on Ctrl-C, but it did
not:
H1!!
H1!!
H1!!
H1!!
^C
C:\Users\Paul\myd>
I have seens that there is std.signals but that does not really
seems related.
Help!