"Invalid handle" error trying to use boost::process

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

"Invalid handle" error trying to use boost::process

Boost - Users mailing list
I'm trying to run a simple program with boost::process, with boost 1.64
I'm using Windows, and visual studio 2015.

I'm just trying to run the supplied "async_cio.cpp" example:

My program is:
    boost::asio::io_service ios;
    boost::asio::streambuf buffer;


    bp::child c(
        "cmd /c dir",
        bp::std_out > buffer,
        ios
        );

    ios.run();

(I've changed if from launching "test.exe" to launching "cmd /c dir").

If I run this I get:
  Exception thrown at 0x49409D2A in ConsoleApplication3.exe: 0xC0000008: An invalid handle was specified.

Running in the debugger, it is in the destructor of the async_pipe object, in "win_iocp_handle_service::close_for_destruction".

I've tried various of the examples with varying degrees of success. But any time I seem to use an async_pipe, I seem to get an "invalid handle" exception when it is calling CloseHandle on the completion port handle.


Any ideas what I'm doing wrong?

Thanks.
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: "Invalid handle" error trying to use boost::process

Boost - Users mailing list

Any ideas what I'm doing wrong?

I'm not sure you're doing anything wrong -- I am seeing the same issue, so it looks like a bug. Try posing to the developers list.

-- chris
 

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: "Invalid handle" error trying to use boost::process

Boost - Users mailing list

It looks like this bug: https://github.com/klemens-morgenstern/boost-process/issues/90


Dne po 8. 5. 2017 20:26 uživatel Chris Glover via Boost-users <[hidden email]> napsal:

Any ideas what I'm doing wrong?

I'm not sure you're doing anything wrong -- I am seeing the same issue, so it looks like a bug. Try posing to the developers list.

-- chris
 
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: "Invalid handle" error trying to use boost::process

Boost - Users mailing list
OK. I've pulled down the relevant fix and it seems to work now.
Thanks for the pointer.

> On 08 May 2017 at 19:53 JF via Boost-users <[hidden email]> wrote:
>
>
> It looks like this bug:
> https://github.com/klemens-morgenstern/boost-process/issues/90
>
> Dne po 8. 5. 2017 20:26 uživatel Chris Glover via Boost-users <
> [hidden email]> napsal:
>
> >
> >> Any ideas what I'm doing wrong?
> >>
> >
> > I'm not sure you're doing anything wrong -- I am seeing the same issue, so
> > it looks like a bug. Try posing to the developers list.
> >
> > -- chris
> >
> > _______________________________________________
> > Boost-users mailing list
> > [hidden email]
> > https://lists.boost.org/mailman/listinfo.cgi/boost-users
> _______________________________________________
> Boost-users mailing list
> [hidden email]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users