Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
1c75ebfc
Commit
1c75ebfc
authored
Nov 26, 2004
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed handling of child processes in zopectl (DM)
parent
507ab6cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/Zope/Startup/zopectl.py
lib/python/Zope/Startup/zopectl.py
+15
-1
No files found.
doc/CHANGES.txt
View file @
1c75ebfc
...
@@ -46,6 +46,8 @@ Zope Changes
...
@@ -46,6 +46,8 @@ Zope Changes
Bugs fixed
Bugs fixed
- zopectl: fixed handling of child processes (patch by Dieter Maurer)
- Collector #1593: fixed dumb _get_id() implementation in
- Collector #1593: fixed dumb _get_id() implementation in
OFS.CopySupport that produced copy_of_copy_of....files
OFS.CopySupport that produced copy_of_copy_of....files
...
...
lib/python/Zope/Startup/zopectl.py
View file @
1c75ebfc
...
@@ -284,9 +284,23 @@ def main(args=None):
...
@@ -284,9 +284,23 @@ def main(args=None):
c
.
do_status
()
c
.
do_status
()
c
.
cmdloop
()
c
.
cmdloop
()
def
_ignoreSIGCHLD
(
*
unused
):
while
1
:
try
:
os
.
waitpid
(
-
1
,
os
.
WNOHANG
)
except
OSError
:
break
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
# we don't care to be notified of our childrens' exit statuses.
# we don't care to be notified of our childrens' exit statuses.
# this prevents zombie processes from cluttering up the process
# this prevents zombie processes from cluttering up the process
# table when zopectl start/stop is used interactively.
# table when zopectl start/stop is used interactively.
signal
.
signal
(
signal
.
SIGCHLD
,
signal
.
SIG_IGN
)
# DM 2004-11-26: from the Linux "execve(2)" manual page:
# Any signals set to be caught by the calling process are reset
# to their default behaviour.
# The SIGCHLD signal (when set to SIG_IGN) may or may not be reset
# to SIG_DFL.
# If it is not reset, 'os.wait[pid]' can non-deterministically fail.
# Thus, use a way such that "SIGCHLD" is definitely reset in children.
#signal.signal(signal.SIGCHLD, signal.SIG_IGN)
signal
.
signal
(
signal
.
SIGCHLD
,
_ignoreSIGCHLD
)
main
()
main
()
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