Modify

Opened 7 days ago

Last modified 7 days 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: None
Version: Boost 1.65.0 Severity: Problem
Keywords: Cc:

Description

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[] )
{
    
    try
    {
        boost::process::child p( "foo" );
        p.terminate();
    }
    catch ( boost::process::process_error err )
    {
        std::cout << "Error is " << err.code().value();
    }
    
    return 0;
}

Attachments (0)

Change History (1)

comment:1 Changed 7 days ago by jpo38 <jean.porcherot@…>

Version: Boost 1.63.0Boost 1.65.0

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.