control: tags -1 wontfix
On Sun, Oct 05, 2014 at 02:05:21PM +0200, Eduard Bloch wrote:
> Package: git-buildpackage
> Version: 0.6.19
> Severity: minor
>
> Hello,
>
> I wondered why git-buildpackage needs a couple of seconds before it
> starts doing anything. I used "strace -f -o ../log ..." and why do I see
> there:
> it forks itself away and then start a long sequence of failing "close"
> syscalls, closing non-existing descriptors numbered 4..65535. And this
> orgy happens multiple times. I am wondering what this is about? Maybe
> some ugly hack to work around some Python limitations? For O_CLOEXEC or
> something? Whatever it is, please fix it and stop wasting CPU cycles
> and user's time.
This is caused by code like:
import subprocess
popen = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
close_fds=True)
(stdout, stderr) = popen.communicate(input)
since there is no selective close (i.e. only close the fds that are
open) in Python 2.7. This will fix itself when we switch to Python3:
https://www.python.org/dev/peps/pep-0433/
Cheers,
-- Guido