I'll be glad to test and debug this on Linux and Mac OS after it is working on Solaris. My problem with the current change is that the .so file for spawn.c won't even be built on Linux and Mac OS, even though it is required by the code. So even if your C code is perfect (which I'm sure it is :-)), there will have to be a change to setup.py to make the other platforms work. Can you change setup.py as follows?

if osname != 'windows':
    ext_modules += [
            Extension(
                  'pspawn',
                   pspawn_srcs,
                   include_dirs = include_dirs,
                   extra_compile_args = compile_args,
                   extra_link_args = link_args,
                   define_macros = [('_FILE_OFFSET_BITS', '64')]
                   )
           ]

And put this block before:

if osname == 'sunos' or osname == "linux":
       # Unix platforms which the elf extension has been ported to

I tried this on Linux (Ubuntu 7.10) and it compiles fine (although there is a warning about an implicit declaration of fdwalk). However, when I run the code I get an error:

undefined symbol: fdwalk

fdwalk doesn't exist on Linux. Can this be written without using fdwalk or closefrom, neither of which are available on Linux?

Thanks.
Tom



[EMAIL PROTECTED] wrote:
At the present time, I don't have any way of verifying if this
will build correctly on MacOS or Linux.

That leaves me two choices:

1. I can change pkgsubprocess.py to only override _execute_child() if
we're running on SunOS.

2. If somebody has the cycles to try compiling the module on MacOS and
Linux, I'd be happy to add those targets if they actually work.

-j

On Thu, Nov 06, 2008 at 08:26:49PM -0600, Tom Mueller wrote:
It appears as though the spawn.c file is only built on sunos, but it is used everywhere but Windows. That would seem to not work for Linux or MacOS. Can this be built for Linux and MacOS in setup.py too?

Thanks.
Tom

[EMAIL PROTECTED] wrote:
Folks,
We've run into a lot of trouble in recent builds when we attempt to fork
and are low on memory.  This change doesn't do anything to address the
actual memory usage; however, it makes it more likely that we'll
successfully fork a new process when memory is tight.

This change adds an Python interface to posix_spawn(3C) and creates a
subclass of the subprocess.Popen class to use it.

Webrev can be found at the location below.

        http://cr.opensolaris.org/~johansen/webrev-4612/

Thanks,

-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

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

Reply via email to