Opened 15 years ago

Closed 14 years ago

#1577 closed Bugs (fixed)

Some commands don't work because hStdInput == 0

Reported by: Takeshi Mouri <takeshi.mouri.net@…> Owned by: René Rivera
Milestone: Boost.Jam 3.1.17 Component: bjam
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

The function execcmd() zero-initializes STARTUPINFO in exent.c at changeset:38009. But HANDLE value 0 is not equal to INVALID_HANDLE_VALUE. So the member hStdInput points an unknown object. In this case, some shell commands such as "echo" fail.

Please add the following codes:

        /* disable stdin */
        si.hStdInput = INVALID_HANDLE_VALUE;

or

        /* inherit stdin */
        si.hStdInput = GetStdHandle(STD_INPUT_HANDLE);

Change History (2)

comment:1 by René Rivera, 14 years ago

Milestone: Boost 1.36.0Boost.Jam 3.1.17

comment:2 by René Rivera, 14 years ago

Resolution: fixed
Status: newclosed

(In [49883]) Let the child bjam commands inherit stdin, as some commands assume it's available. (fixes #1577)

Note: See TracTickets for help on using tickets.