Opened 12 months ago

Last modified 7 months 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;

Change History (2)

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

Version: Boost 1.63.0Boost 1.65.0

comment:2 Changed 7 months ago by John Maddock

Component: Noneprocess
Note: See TracTickets for help on using tickets.