John, 

I was thinking about this last night. I think we can handle all forked calls 
in the same way. All we have to do is pass the class a boost::function to be 
executed after the fork instead of the current string that is then passed to 
the system() function.

Ie, we'd have a class

class ForkedFunction {
        int startfunction(Starttype, boost::function const & func);
};

and the current 

class Forkedcall {
        int startscript(Starttype, string const & what);        
};

whould just be a wrapper to ForkedFunction, passing 
        boost::function(system, what)
to startfunction.

Forkedcontrl then becomes a controller of ForkedFunctions.

All that shit in the Ispell c-tor after the fork() call wouldl then be 
wrapped in a separate function that could also be passed to ForkedFunction.

Voilà! A single interface to fork() or spawnvp() on cygwin etc.

What do the experts think? Is the concept sound?

Angus

ps Incidentally, it looks to me like "the Pipestream class that André posted 
to the list" is custom-made for ispell too.

A.

Reply via email to