gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Runtime.exec & Ant & Gump3
Date Tue, 12 Jul 2005 14:22:42 GMT
Leo Simons wrote:
> Adam R. B. Jack wrote:
> 
>>>No. Gump2 does not set the process group id. Gump3 calls setpgrp (man
>>>setpgrp :-)). Note there isn't a whole lot of software out there that
>>>make setpgrp calls...
>>
>>Yes Leo, it does.
> 
> 
> NooOOOhOOooohhoh! :-)
> 
> WTF. Crap. So now I really have no clue where the problem is. We may
> have a python bug then.
> 
> 
>>Recall I implemented a scheme right before you got input
>>on how to do it (we even discussed if my approach would work, or not. :-)
>>The code is messy (for historical reasons, and 'cos it was tryign to do
>>sometihng on M$) but it is here.
> 
> 
> And, more importantly, it works. Remember it took the python people a
> POpen, POpen2, POpen3, POpen4, POpen5 to get to subprocess.POpen, which
> as it turns out isn't all that perfect yet either.
> 
> I just really really want to know *why* it works (or not).
> 
> 
>>https://svn.apache.org/repos/asf/gump/trunk/python/gump/util/process/launcher.py
>>
>>BTW: A month or so ago I notice Gump2 hanging, when I ran it from command
>>line, and it seemed to improve if I passed it "< /dev/null".
> 
> 
> Would you be able to figure out something more specific than "A month ago"?
> 
> 
>>I kinda figured
>>something had changed in Ant, or in one of the Ant scripts, that was
>>blocking on input. That said, I never tracked anything down
> 
> 
> I think that might be worth it.
> 
> 
>>& I don't know
>>if it is still happening.
> 
> 
> I suspect the important bit here is that gump2 does this:
> 
>         # Allow redirect
>         cmd += ' >>' + str(outputFile) + ' 2>&1'
> 
>         # Run the command
>         systemReturn = os.system(cmd)
> 
> cuz otherwise most of the end results are the same, eg gump2 also does
> 
>                 (childPID, waitcode) = os.waitpid(forkPID,0)
> 
> and the like. However, subprocess.py uses os.execvp() or os.execvpe()
> and not os.system. I'll have to take a look at the source code of
> posix.system() (which powers os.system). There's definitely some file
> descriptor magic to fix, somewhere.

do you think it's time to throw a python task force at it?

I'm sure the python community would be quite pleased to help us making
the entire apache software (especially all the java stuff) with a python
script.

-- 
Stefano, ego-tickle master ;-)


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message