Since kLIBC v0.6.6, new functions for search-in-path are introduced. They are _path2() , _searchenv2() , _searchenv2_value() , _searchenv2_has_suffix() and _searchenv2_one_file() . Out of these, unfortunately, _path2() has a bug which is fixed already but not released yet. For details, see the ticket . Because of this, functions using _path2() such as spawn[lv]p[e]() and exec[lv]p[e]() have the same bug. Until the fixed new libc is released, there is a way to workaround for the bug. The bug occurs if and only if EMXPATH env var is not set and a directory entry with the same name as the executable exists. So setting empty EMXPATH would be able to avoid the bug unless EMXPATH is set. Put the following codes into startup codes. Colored By Color Scripter ™ 1 2 if (!getenv( "EMXPATH" )) putenv( "EMXPATH=" );