Index: test.d ================================================================== --- test.d +++ test.d @@ -2,10 +2,12 @@ import std.array; import std.conv; import std.stdio; import std.string; import std.typecons; +import core.stdc.signal; +import core.stdc.stdlib; import dfl.all; class Map { private char[][] data; @@ -373,11 +375,21 @@ } this.text = .text("Score: ", score, " air[",m.water_proof-m.underwater,"]"); invalidate(); } } + +extern(C) { + void sigint(int) { + write("A"); + stdout.flush(); + exit(0); + } +} void main(string[] args) { + signal(SIGINT, &sigint); + Form myForm = new MyForm(new Map(File(args[1]))); Application.run(myForm); }