Child process doesn't terminate upon signal (MiniZinc)

0

I'm looking for an insight on what is happening, here.

I'm on Windows 7. I'm trying to use MiniZinc, a constraint solving framework and modeling language, for a university assignment. Within MiniZinc, a general-purpose solver is run as a child process. The problem is that, when calling minizincfrom the command line and subsequently interrupting it, the termination signal doesn't seem to propagate to the solver, i.e. if I call:

minizinc <model>.mzn

where <model>.mzn is a file that encodes a constraint satisfaction problem in MiniZinc's language, and then press CTRL-C, then minizinc.exe will terminate, but not fzn-gecode.exe, which is the default solver called by minizinc. I have to shut it down manually from the task manager. (The solving process can be very slow, depending on the constraint satisfaction problem, and sometimes I have to abort it.)

Using the Windows' command prompt, a second CTRL-C terminates fzn-gecode.exe. In Cygwin, on the other hand, subsequent CTRL-Cs do not have any effect. Also, the command ps doesn't list fzn-gecode.exe as an active process (it is considered a Windows process).

However, if I use the interactive version of MiniZinc, and start and stop the execution from within it, then fzn-gecode.exe correctly terminates.

I literally couldn't find anything online about this behavior, so I was thinking that it's happening only to me. In fact, I tried on another machine with the same OS, and minizinc works fine when called (and interrupted) from Windows' command prompt, but again not from Cygwin.

Any idea of what causes this problem and how I could (programmatically) bypass it? Thanks.

giofrida

Posted 2019-04-20T16:53:38.670

Reputation: 1

No answers