lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Monday 23 May 2005 03:33, William Trenker wrote:
>     int ok = (pclose(f) != -1) || (fclose(f) == 0);     // <<<---

Yes, this is a known problem (it fails on my platform, too). It's actually a 
Posix violation, but just happens to work on most platforms.

The problem is that fixing would require some pretty hefty rewriting of the 
way files are managed (because you need to store whether the FILE* came from 
popen() or fopen(), which means you need another word of storage, which means 
you can't store the FILE* in a lightuserdata), and, well, no-one's got around 
to doing it yet.

But it's good to know that it fails on uclibc as well as my wacky OS.

+- David Given --McQ-+ "You cannot truly appreciate _Atlas Shrugged_
|    | until you have read it in the original Klingon."
| ( | --- Sea Wasp on r.a.sf.w
+- --+