Opened 6 months ago

Last modified 3 weeks ago

#13322 new Bugs

boost::process reports ERROR_INVALID_HANDLE instead of ERROR_FILE_NOT_FOUND when program cannot be found

Reported by: jpo38 <jean.porcherot@…> Owned by:
Milestone: To Be Determined Component: process
Version: Boost 1.65.0 Severity: Problem
Keywords: Cc:


Under Windows, the following program outputs "Error is 6" (6 means ERROR_INVALID_HANDLE), while it should report "Error is 2" (2 means ERROR_FILE_NOT_FOUND).

#include <boost/process.hpp>
#include <iostream>

int main( int argc, char* argv[] )
        boost::process::child p( "foo" );
    catch ( boost::process::process_error err )
        std::cout << "Error is " << err.code().value();
    return 0;

Attachments (0)

Change History (2)

comment:1 Changed 6 months ago by jpo38 <jean.porcherot@…>

Version: Boost 1.63.0Boost 1.65.0

comment:2 Changed 3 weeks ago by John Maddock

Component: Noneprocess

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.