[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Portably iterate over a directory
- From: Peter Cawley <lua@...>
- Date: Tue, 1 Dec 2009 13:59:36 +0000
On Tue, Dec 1, 2009 at 1:42 PM, Jerome Vuarand <jerome.vuarand@gmail.com> wrote:
> 2009/12/1 steve donovan <steve.j.donovan@gmail.com>:
>> On Tue, Dec 1, 2009 at 1:34 PM, Jerome Vuarand <jerome.vuarand@gmail.com> wrote:
>>> AFAIK io.popen works on Windows (I'm using it daily, and I don't
>>> remember having patched it apart from my unicode patch).
>>
>> With the exception of Windows GUI applications, where it simply does
>> not work. Fine for console apps, however. (There are equivalent ways
>> to do this on Windows, I'll dig them up if you're interested, but yes,
>> they do require an extension ;))
>
> I'm using it in GUI applications too. What kind of problems do you
> have ?
According to Microsoft's documentation
(http://msdn.microsoft.com/en-us/library/96ayss4b.aspx) : "If used in
a Windows program, the _popen function returns an invalid file pointer
that causes the program to stop responding indefinitely. _popen works
properly in a console application.", so it shouldn't work in a GUI
application.