Tom, > 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.
Rich sent me an off-list e-mail about some other possibilities for fdwalk. This lead to an inspection of the underlying code for fdwalk, available here. http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/closefrom.c#54 In the optimal case, fdwalk looks at /proc/self/fd to find the list of open file descriptors. If MacOS and Linux both support this interface, we could easily write a multi-platform version of closeall and take it out of the C module. If you're able to check for the existence of /proc/self/fd on MacOS and Linux, and would like to use posix_spawn on those platforms, I don't think it should be too hard to re-write this as a Python function. Thanks again to Rich for keeping me honest. -j _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
