gui/windows-interrupt.scm
#|
Jared Davis' Windows ACL2 installer includes a program called "sendctrlc.exe".
That program simulates a Unix interrupt signal to a given process (PID).
sendctrlc.exe is located next to acl2.exe.
|#
(module windows-interrupt mzscheme
  (require (lib "process.ss"))
  (provide windows-interrupt)
  
  (define *sendctrlc.exe* "sendctrlc.exe")
  
  ;; Path PID -> Boolean
  (define (windows-interrupt path-to-acl2.exe pid)
    (let-values ([(base name dir?) (split-path path-to-acl2.exe)])
      (let ([ctrlc.exe (build-path base *sendctrlc.exe*)])
        (system* ctrlc.exe pid))))
  )