Boost logo

Boost :

From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2008-09-01 11:44:56


Boris wrote:
>> -> Using named pipes has been problematic because it returns errors
>> when launching multiple processes aggressively: Error 231 - All Pipes
>> are Busy. This does not happen with anonymous pipes and I think it has
>> some relationship with the guid code. By the way, I think a uuid
>> library is too much to create a unique identifier to be shared with
>> the child a simple atomic count would to the job in my opinion. That
>> would reduce Boost.Process dependencies.
>
> An atomic count might not be sufficient as it would be unique only per
> process. As I used Boost.Uuid only for convenience though I'll replace
> it with an atomic count plus a random number to drop the dependency.

The PID of the parent plus an atomic count wouldn't be enough?

>> -> systembuf::close() should call sync() to push the last charaters
>> into the pipe, othewise, characters are lost if the user does not
>> flush the stream.
>
> Changed (in postream::close()).

I think we must change this in systembuf, because a user might use the
streambuf directly and it would be surprised to see that unlike
std::filebuf, already written characters are missed.

Regards,

Ion


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk