I'm open to the idea of using the C code only on Solaris or even
OpenSolaris. For multi-platform projects, I expect that the number of
packages will not be so large that memory size is a problem running
subprocesses. Also, the majority of situations where running a
subprocess is even necessary are OpenSolaris or run-as-root only (driver
installation, SMF, etc.) If we do get to the point where the
performance improvement from this is necessary, we can do the porting of
that later.
I expect that this could be done by changing the
if not subprocess.mswindows:
to
if portable.osname == "sunos":
in pkgsubprocess.py. Then setup.py could stay the way it is.
Tom
[EMAIL PROTECTED] wrote:
Can you change setup.py as follows?
Let's negociate the fdwalk stuff before I change setup.
fdwalk doesn't exist on Linux. Can this be written without using fdwalk or
closefrom, neither of which are available on Linux?
The point of using fdwalk is to support the close_all option to Popen.
The standard implementation of subprocess iterates from 3 to MAXFD,
calling close on every single file descriptor.
To close a file descriptor used by posix_spawn, we have to add an entry
to a posix_spawn_file_actions_t structure. Adding every file descriptor
from 3 to MAXFD seemed wasteful. It makes a lot more sense to do this
with fdwalk, since you only add the fds that are open at the time you
perform the walk.
I looked around on Google, but I haven't been able to find an equivalent
operation in glibc.
We should keep fdwalk for SunOS, since it's pretty useful. I'm open to
suggestions about what we do for Linux/MacOS, though.
-j
begin:vcard
fn:Tom Mueller
n:Mueller;Tom
org:Sun Microsystems, Inc.;SWI Install/Update Software
adr:;;21915 Hillandale Dr;Elkhorn;NE;68022;USA
email;internet:[EMAIL PROTECTED]
title:Senior Staff Engineer
tel;work:877-250-4011
tel;fax:877-250-4011
tel;home:402-916-9943
x-mozilla-html:TRUE
version:2.1
end:vcard
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss