lua-users home
lua-l archive

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


Mike Panetta wrote:

The only thing I can do I tell you what I absolutly need the library to
support...  Will this platform independant library give me these things?

1. The ability to fork and exec arbitrary processes off and wait (without
blocking!) for them to finish executing, and give me an exit status from
said process. (Getting the exit status from the process is VERY important in
my application)

I have Lua windows code that does this.


3. File/Directory manipulation.

Can be made to match. (luafs however is not the answer).
For the time being, assume that implementation will do this well.


4. IO Pipes between processes.  I routinely wrap unix utilities to redirect
their output to an LCD (after some formatting) to tell the user whats
happening on the system (IE fsck completion info)

I have Lua windows code that does this.


Mike


On 10/17/06, Doug Currie <doug.currie@gmail.com> wrote:
> Tuesday, October 17, 2006, 7:03:04 PM, Natanael Copa wrote:
>
> > The question is what posix funcs can't windows do, and then maybe do
> > something special there. Is there a list of posix things windows can't
> > do?
>
> Superficially things look quite rosy; then you hit a brick wall. Off
> the top of my head...
>
> File descriptors in posix and HANDLES in Windows are not quite
> equivalent. For example, select() in posix can use a file descriptor
> to a file or socket, whereas in Windows only sockets work. There are
> probably many similar issues with streams, standard I/O, process
> handle inheritance, ownership, permissions, etc.
>
> Symlinks are difficult. There have been attempts using NTFS reparse
> points, but the semantics of these links differ from UNIX symlinks.
> http://svn.haxx.se/dev/archive-2004-10/1023.shtml
>
> Windows has a root directory and a current directory on each drive.
> There is no single root directory "/"
>
> Timers and time accounting are quite different. gettimeofday() can be
> a real bear to emulate correctly; google for all the bug reports to
> see what I mean.
>
> Signals work much differently. Windows uses different mechanisms.
>
> Windows threads are fine, but different from pthreads, e.g., no condition
> variables.
>
> The conformance page at
> http://sourceware.org/pthreads-win32/conformance.html
> will give you an idea of what's hard to do in the process/threads
> area. sigwait() is not implemented, for example.
>
> e
>
> --
> Doug Currie
> Londonderry, NH
>
>