Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
aa078080
Commit
aa078080
authored
Dec 05, 2015
by
Martin Panter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #25764: OS X now failing on the second setrlimit() call
parent
2d2af91d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
Lib/test/test_subprocess.py
Lib/test/test_subprocess.py
+8
-5
No files found.
Lib/test/test_subprocess.py
View file @
aa078080
...
@@ -1520,14 +1520,17 @@ class POSIXProcessTestCase(BaseTestCase):
...
@@ -1520,14 +1520,17 @@ class POSIXProcessTestCase(BaseTestCase):
except
ImportError
as
err
:
except
ImportError
as
err
:
self
.
skipTest
(
err
)
# RLIMIT_NPROC is specific to Linux and BSD
self
.
skipTest
(
err
)
# RLIMIT_NPROC is specific to Linux and BSD
limits
=
getrlimit
(
RLIMIT_NPROC
)
limits
=
getrlimit
(
RLIMIT_NPROC
)
[
_
,
hard
]
=
limits
try
:
try
:
setrlimit
(
RLIMIT_NPROC
,
limits
)
setrlimit
(
RLIMIT_NPROC
,
limits
)
setrlimit
(
RLIMIT_NPROC
,
(
0
,
hard
))
except
ValueError
as
err
:
except
ValueError
as
err
:
# Seems to happen on AMD64 Snow Leop and x86-64 Yosemite buildbots
# Seems to happen on various OS X buildbots
print
(
f"Setting NPROC to
{
limits
!
r
}
:
{
err
!
r
}
, RLIM_INFINITY=
{
RLIM_INFINITY
!
r
}
"
)
print
(
self
.
skipTest
(
"Setting existing NPROC limit failed"
)
f"Setting NPROC failed:
{
err
!
r
}
, limits=
{
limits
!
r
}
, "
[
_
,
hard
]
=
limits
f"RLIM_INFINITY=
{
RLIM_INFINITY
!
r
}
, "
setrlimit
(
RLIMIT_NPROC
,
(
0
,
hard
))
f"getrlimit() ->
{
getrlimit
(
RLIMIT_NPROC
)
!
r
}
"
)
self
.
skipTest
(
"Setting NPROC limit failed"
)
self
.
addCleanup
(
setrlimit
,
RLIMIT_NPROC
,
limits
)
self
.
addCleanup
(
setrlimit
,
RLIMIT_NPROC
,
limits
)
# Forking should raise EAGAIN, translated to BlockingIOError
# Forking should raise EAGAIN, translated to BlockingIOError
with
self
.
assertRaises
(
BlockingIOError
):
with
self
.
assertRaises
(
BlockingIOError
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment