OS/2 codes: workaround for a bug of _path2() of kLIBC v0.6.6

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 unlessEMXPATH is set.

Put the following codes into startup codes.

1
2
if (!getenv("EMXPATH"))
    putenv("EMXPATH=");




댓글

이 블로그의 인기 게시물

토렌트: < 왕좌의 게임 > 시즌 1 ~ 시즌 8 완결편 마그넷

토렌트: NGC < 코스모스 > 우리말 더빙 전편(1편~13편) 마그넷

토렌트: < 스타워즈 > Ep.1 ~ Ep.6 마그넷