Skip to content

Commit 6950abd

Browse files
author
Roland Hedberg
committed
Merge pull request #318 from knaperek/fix-xmlsec-zombies
Wait until xmlsec program completes to avoid zombies
2 parents c37e1c1 + dc996f8 commit 6950abd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/saml2/algsupport.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def get_algorithm_support(xmlsec):
3939

4040
p_out = pof.stdout.read().decode('utf-8')
4141
p_err = pof.stderr.read().decode('utf-8')
42+
pof.wait()
4243

4344
if not p_err:
4445
p = p_out.split('\n')
@@ -73,4 +74,4 @@ def algorithm_support_in_metadata(xmlsec):
7374
res = get_algorithm_support(xmlsec)
7475
print(res)
7576
for a in algorithm_support_in_metadata(xmlsec):
76-
print(a)
77+
print(a)

src/saml2/sigver.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@ def version(self):
797797
com_list = [self.xmlsec, "--version"]
798798
pof = Popen(com_list, stderr=PIPE, stdout=PIPE)
799799
content = pof.stdout.read().decode('ascii')
800+
pof.wait()
800801
try:
801802
return content.split(" ")[1]
802803
except IndexError:
@@ -990,6 +991,7 @@ def _run_xmlsec(self, com_list, extra_args, validate_output=True,
990991

991992
p_out = pof.stdout.read().decode('utf-8')
992993
p_err = pof.stderr.read().decode('utf-8')
994+
pof.wait()
993995

994996
if pof.returncode is not None and pof.returncode < 0:
995997
logger.error(LOG_LINE, p_out, p_err)

0 commit comments

Comments
 (0)