On Mon, 11 Jul 2011 20:59:29 -0700 (PDT)
Fan <zjuwu...@gmail.com> wrote:

> It seems that waitpid take process handle instead of process id as the
> first parameter on Windows.  On Unices platform, the first parameter
> is process id.
> 
> This interface is a little bit confusing. What's the purpose for such
> a design?
> 
> Thanks a lot,
> Fan

I would assume it's because that's how the underlying OS primitives
work. Under Windows, concepts of "process ID" and "process handle" both
exist (and are separate), and the functions that wait for events to
occur (WaitForSingleObject, WaitForMultipleObjects, and so on) take
handles of various sorts, including process handles. Under Linux, there
is no such thing as a process handle, only a process ID, and waitpid
(the system call) takes a process ID.

Chris
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to