I am updating a program from 4.5 to 6.0, the program read some text and then speak it, in 4.5 using the macOS AppleScript package but that package was based in 32 bit Carbon so do not work in 64 bit VM or after Mojave, it seems that in python are a beta of a package which can be ported to squeak but for the meantime I am using PipeableOSProcess to call the unix program osascript and that works.
The problem occurs because some text are large or not interesting so the program can interrupt the speak with a key for implement that I use a "terminate" in the processProxy and that also work, but now in the Process Browser appear an AioEventHandler>>handleExceptions:readEvents:writeEvents: process and after more interruptions a debuger in ExternalPipe(Object)>>error: with a message of 'cannot create OS pipe' appears.
So I need to know the correct way to kill the unix process or perhaps PipeableOSProcess is not the way.
TIA
Hi Javier,
I am not sure if this will work for you, but try this:
myPipeableOSProces processProxy terminate. myPipeableOSProces closePipes.
The closePipes will probably clean up the pipe reader process, and that may be all that is needed.
If that does not work, can you please post a code snippet to show how you are starting the PipeableOSProcess for osascript and I will try to give a better answer.
Thanks,
Dave
On 2023-12-05 22:52, Javier Diaz-Reinoso via Squeak-dev wrote:
I am updating a program from 4.5 to 6.0, the program read some text and then speak it, in 4.5 using the macOS AppleScript package but that package was based in 32 bit Carbon so do not work in 64 bit VM or after Mojave, it seems that in python are a beta of a package which can be ported to squeak but for the meantime I am using PipeableOSProcess to call the unix program osascript and that works.
The problem occurs because some text are large or not interesting so the program can interrupt the speak with a key for implement that I use a "terminate" in the processProxy and that also work, but now in the Process Browser appear an AioEventHandler>>handleExceptions:readEvents:writeEvents: process and after more interruptions a debuger in ExternalPipe(Object)>>error: with a message of 'cannot create OS pipe' appears.
So I need to know the correct way to kill the unix process or perhaps PipeableOSProcess is not the way.
TIA
That solved the problem, no more AioEventHandler in Process Browser.
Thank you very much!
On 5 Dec 2023, at 20:09, lewis@mail.msen.com wrote:
Hi Javier,
I am not sure if this will work for you, but try this:
myPipeableOSProces processProxy terminate. myPipeableOSProces closePipes.
The closePipes will probably clean up the pipe reader process, and that may be all that is needed.
If that does not work, can you please post a code snippet to show how you are starting the PipeableOSProcess for osascript and I will try to give a better answer.
Thanks,
Dave
On 2023-12-05 22:52, Javier Diaz-Reinoso via Squeak-dev wrote:
I am updating a program from 4.5 to 6.0, the program read some text and then speak it, in 4.5 using the macOS AppleScript package but that package was based in 32 bit Carbon so do not work in 64 bit VM or after Mojave, it seems that in python are a beta of a package which can be ported to squeak but for the meantime I am using PipeableOSProcess to call the unix program osascript and that works.
The problem occurs because some text are large or not interesting so the program can interrupt the speak with a key for implement that I use a "terminate" in the processProxy and that also work, but now in the Process Browser appear an AioEventHandler>>handleExceptions:readEvents:writeEvents: process and after more interruptions a debuger in ExternalPipe(Object)>>error: with a message of 'cannot create OS pipe' appears.
So I need to know the correct way to kill the unix process or perhaps PipeableOSProcess is not the way.
TIA
squeak-dev@lists.squeakfoundation.org