Re: C atexit(), g_atexit -- how to cleanup when a gtk application crashes?



On Wed, 2016-11-30 at 12:58 +0100, Stefan Salewski wrote:
I may have an idea:

Call inside the cleanup proc

Seems to work fine indeed:

proc cleanup {.noconv.} =
  var msg: StatusMsg
  let app = applicationGetDefault()
  if not app.isRemote:
    #echo "not app.isRemote"
    msg.filepath = nil
    channel.send(msg)
    joinThreads(thread)
    if nsProcess != nil:
      nsProcess.terminate
      discard nsProcess.waitForExit
      nsProcess.close


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]