[Win32utils-devel] win32-process 0.3.1 is out

win32utils-devel at rubyforge.org win32utils-devel at rubyforge.org
Fri Dec 10 16:05:41 EST 2004


> > That seems a reasonable compromise to me, though I worry about 
> > breaking too much with the way things work on *nix.  Thoughts?
> > 
> The standard Ruby Process.waitpid2 method already takes a 2nd 
> argument, but this is a flag and not a timeout value. I think 
> it would be a bad idea to introduce incompatible semantics 
> for the sake of portability of ruby code beween windows and *nix.

Heh - the 2nd argument is unused internally at the moment.  I put it
there in case we ever came up with definitions for WNOHANG and WUNTRACED
(or our own special constants).  Perhaps a 3rd argument?

> I am pretty unfamiliar with the Win32 API, but I would assume 
> it's possible to use threads and mutexes in the C code.
> Could the C code launch a new thread and do the 
> WaitForSingleObject there? Then the process_waitpid2 could 
> block until a condition variable is released - either as the 
> result of WaitForSingleObject returning, or as the result of 
> a C-intercepted Ruby exception (the timeout exception). I 
> don't know if this is possible though - what do you think - 
> you're the Ruby-Win32-C specialist ;-)
> Aslak

Now there's an idea.  I'll have to look into it.  In the meantime if you
or anyone else listening has any ideas as to what the actual C code
should be (Park?), I'd be happy to hear them. :)

- Dan

More information about the win32utils-devel mailing list