Boost logo

Boost :

Subject: Re: [boost] [Boost-users] Subject: Formal Review of Proposed Boost.Process library starts tomorrow
From: Ilya Sokolov (ilyasokol_at_[hidden])
Date: 2011-02-09 01:30:38


On Wed, 09 Feb 2011 05:14:59 +0500, Boris Schaeling <boris_at_[hidden]>
wrote:
> On Mon, 07 Feb 2011 19:22:24 +0100, Steven Watanabe [snip]
>
>> * "On POSIX systems you must use the macros defined
>> in sys/wait.h to interpret exit codes."
>>
>> This forces me to use #ifdefs in my code. Isn't
>> there a way to abstract this better? At least
>> you could wrap the macros and have a trivial
>> implementation for windows (WIFEXITED -> true)
>
> I'm not sure whether we can abstract away what I think is a conceptual
> difference. No matter what we do one developer has to do something
> extra: The POSIX guy has to use macros and the Windows guy has to call a
> dummy function which always returns true before he can evaluate the exit
> code. While it's both not nice I find the macros less obfuscating (as
> it's POSIX which requires to do something extra).

+1

> [snip]
>
>> [...]* What is the behavior of find_executable_in_path W.R.T.
>> extensions. On windows, does it use PATHEXT?
>> I'd like to see this spelled out explicitly.
>
> This reminds me of an email I had received a while back. The Windows
> implementation of find_executable_in_path() must be changed. It's
> currently based on SearchPathA() but we probably have to use
> FindFirstFile() and FindNextFile(). Then we can also do what we like and
> use PATHEXT for example.

IFAIK, SearchPath() supports PATHEXT through the lpExtension parameter:
http://msdn.microsoft.com/en-us/library/aa365527(v=vs.85).aspx
Also see the 'Remarks' section about SafeProcessSearchMode and the docs on
NeedCurrentDirectoryForExePath() function:
http://msdn.microsoft.com/en-us/library/ms684269(v=vs.85).aspx

> [snip]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk