[dokuwiki] Re: Spell Checker Hang

  • From: "Neulinger, Nathan" <nneul@xxxxxxx>
  • To: <dokuwiki@xxxxxxxxxxxxx>
  • Date: Wed, 21 Jun 2006 15:07:24 -0500

Solution on unix is pretty easy, but unknown if similar will work on
windows:

Create a pipe in parent
Fork and write to the pipe from child - terminate in child when done
Read from pipe in parent

You're not really doing bidirectional I/O, so it's a little easier to
deal with.

Unfortunately, not sure that approach will work on windows. Does php on
windows do fork?

-- Nathan
 
------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@xxxxxxx
University of Missouri - Rolla         Phone: (573) 341-6679
UMR Information Technology             Fax: (573) 341-4216
 

> -----Original Message-----
> From: dokuwiki-bounce@xxxxxxxxxxxxx 
> [mailto:dokuwiki-bounce@xxxxxxxxxxxxx] On Behalf Of Andreas Gohr
> Sent: Tuesday, June 20, 2006 4:11 PM
> To: dokuwiki@xxxxxxxxxxxxx
> Subject: [dokuwiki] Re: Spell Checker Hang
> 
> On Mon, 19 Jun 2006 18:52:14 +0200
> "Lothar Speil" <speil@xxxxxxxxxxxxxxx> wrote:
> 
> > But unfortunately still not for
> > "bigger" texts, aspell.exe seems to hang and does nothing.
> 
> I just spent some hours debugging this stuff on Windows and it looks
> like there is no solution.
> 
> To communicate with a program bidirectional through a pipe 
> and handling
> I/O buffers correctly we need two things (correct me if I'm wrong): a
> way to set the multiple streams to non-blocking and a way to check on
> which stream data to write/read is availble. In PHP this is 
> done through
> stream_set_blocking() and stream_select(). Unfortunatly both 
> seem not to
> work on Windows. We maybe could live without the second one but I fear
> the first one is crucial.
> 
> There may be a way to work around the buffer limits somehow with a
> similar solution posted by Nathan a few days ago using intermediate
> files. Maybe even a wrapper with it's own, but big input buffer could
> work as well, though I'm not really sure who is responsible for the
> current limits (PHP? the OS? or aspell?).
> 
> If someone could come up with a solution without using intermediate
> files, I'd be happy. If we need to use them I'd like use them only on
> affected systems (Windows) and keep the current and more ellegant one
> for real systems. However I'm done with what I can do. Windows is
> not my main system so others have to step in if they want a solution.
> 
> For now I just added a timeout patch which will show an error message
> when the spell check backend does not return after 13 seconds, so
> editing can continue.
> 
> Andi
> 

--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: