[code] [textadept] proc:kill()

From: Richard Philips <richard.philips.att.gmail.com>
Date: Mon, 12 May 2014 14:11:08 +0200

Hi Mitchell,

(sorry if did already sent this message - I found it back in my drafts
folder and I'm not sure I sent it out ;-)

Again about spawn and proc :-)

I'm using proc:kill().

It works perfectly with Unix (Ubuntu) but in Windows it causes problems.

The kill is executed, there is no error but the process remains alive.
If, after the kill, I issue a proc:status(), textadept freezes and I have
to force quit it.

The following example ON WINDOWS illustrates the problem:

function test()
  local process = spawn("charmap.exe") -- launches Windows character map
  ui.dialogs.msgbox{ -- shows the status of the process
    title = 'Alert!',
    width = 900,
    float = true,
    icon = 'gtk-dialog-info',
    text = process:status()
    }

  process:kill() -- kills the process but does not succeed

  ui.dialogs.msgbox{ -- shows the status of the process
    title = 'Alert!',
    width = 900,
    float = true,
    icon = 'gtk-dialog-info',
    text = process:status()
    }

  -- textadept is not stable anymore

end

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 12 May 2014 - 08:11:08 EDT

This archive was generated by hypermail 2.2.0 : Tue 13 May 2014 - 06:53:14 EDT