Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost.asio / asio] leaving descriptor open in posix::stream_descriptor
From: Boris Schaeling (boris_at_[hidden])
Date: 2010-12-22 18:22:54


On Wed, 22 Dec 2010 09:18:40 +0100, Daniel Mierswa <impulze_at_[hidden]>
wrote:

> Hey there,
> is it possible to avoid closing the descriptor when the destructor
> of posix::{basic_,}stream_descriptor is called?

Unfortunately it isn't (stream_descriptor always owns the file descriptor).

> I guess I have to roll my own service or something else but I don't know
> where to start, I'm also sending this to the boost mailing list.

I also would like to see a stream_descriptor which doesn't own the file
descriptor as right now you can't share ownership with other objects
(that's why I had to add a release() method to the handle class in the
latest Boost.Process draft as ownership must be passed from handle to
stream_descriptor).

Boris


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net