mirror of
https://git.freebsd.org/ports.git
synced 2025-06-01 02:46:27 -04:00
Update to 0.999 and work around buggy getpid() implementations in compiler.
PR: ports/65846 Submitted by: Marco Molteni <mmolteni@cisco.com>
This commit is contained in:
parent
805c70e719
commit
8a4b4d2c5c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=108869
3 changed files with 32 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= pexpect
|
||||
PORTVERSION= 0.99
|
||||
PORTVERSION= 0.999
|
||||
CATEGORIES= misc python
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
MD5 (pexpect-0.99.tgz) = 597081031c64fc58dc9a0dc5bc6c078c
|
||||
SIZE (pexpect-0.99.tgz) = 19933
|
||||
MD5 (pexpect-0.999.tgz) = e426e5f54d323aaf392008c9eb35131d
|
||||
SIZE (pexpect-0.999.tgz) = 20190
|
||||
|
|
29
misc/py-pexpect/files/patch-pexpect.py
Normal file
29
misc/py-pexpect/files/patch-pexpect.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
--- pexpect.py.orig Mon Apr 26 14:16:08 2004
|
||||
+++ pexpect.py Mon Apr 26 14:19:45 2004
|
||||
@@ -498,21 +498,24 @@ class spawn:
|
||||
pid, status = os.waitpid(self.pid, os.WNOHANG)
|
||||
except OSError:
|
||||
return 0
|
||||
|
||||
# I have to do this twice for Solaris.
|
||||
# I can't even believe that I figured this out...
|
||||
- if pid == 0 and status == 0:
|
||||
+
|
||||
+ # If waitpid() returns 0 it means that no child process wishes to
|
||||
+ # report, and the value of status is undefined.
|
||||
+ if pid == 0:
|
||||
try:
|
||||
pid, status = os.waitpid(self.pid, os.WNOHANG)
|
||||
#print 'Solaris sucks'
|
||||
except OSError: # This is crufty. When does this happen?
|
||||
return 0
|
||||
# If pid and status is still 0 after two calls to waitpid() then
|
||||
# the process really is alive. This seems to work on all platforms.
|
||||
- if pid == 0 and status == 0:
|
||||
+ if pid == 0:
|
||||
return 1
|
||||
|
||||
# I do not OR this together because I want hooks for debugging.
|
||||
if os.WIFEXITED (status):
|
||||
self.exitstatus = os.WEXITSTATUS(status)
|
||||
return 0
|
Loading…
Add table
Reference in a new issue