Closed davidvontamar closed 1 year ago
I'm not sure that this is a bug. handle:close()
closes a process'
stdin. Your loop reads from the process' stdout until there is none left
(i.e. the process finished). I would expect that attempting to close
stdin on a completed process would cause an error.
Is this a new behavior introduced in Textadept 12.0? Textadept 11.4 did not raise such an error. Is it safe to remove the handle:close()
command in Textadept 12.0? In addition, is there a way in which I can check if the process still needs closing?
You can remove handle:close()
. It's only needed if you're sending
stdin to the process. Processes clean up after themselves, so you don't
have to do anything. I don't know if you're using the Qt or GTK version,
but it's possible that the Qt version's internal process implementation
raises this error while the GTK version doesn't.
OK, thanks! I'm using the Qt version. I like Qt and all my desktop apps are Qt apps. I'm very happy that Textadept transitioned to Qt now.
I'm testing now Textadept 12.0 alpha and the command
spawn_proc:close()
, which previously worked, now appears to be broken.The following code:
Will raise an error in Textadept: