Well, I just want to close a socket before quiting if the user press Ctrl-C.

That said, looking through the code, I would say that it have no implementation for Windows... even if it should have signals.

And even there, I do not really understand how I am suppose to use it.
I think it should looks like:

import std.stdio;
import core.sys.posix.signal;

void mybye(int value){
  writeln("oh... Bye then!");
}

void main(){
    sigset(SIGINT, &mybye);
        while (true) writeln("H1!!");
}

which gives me:
C:\Users\Paul\myd>dmd loop2.d
loop2.d(9): Error: undefined identifier sigset

Which I guess is because there is no Windows implementation... yet.



Reply via email to