Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mininet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olaf Bergmann
mininet
Commits
8e63e2c5
Commit
8e63e2c5
authored
10 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Fix undefined sleep()
parent
273c4e94
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mininet/clean.py
+3
-2
3 additions, 2 deletions
mininet/clean.py
with
3 additions
and
2 deletions
mininet/clean.py
+
3
−
2
View file @
8e63e2c5
...
...
@@ -16,6 +16,7 @@
from
mininet.log
import
info
from
mininet.term
import
cleanUpScreens
def
sh
(
cmd
):
"
Print a command and send it to the shell
"
info
(
cmd
+
'
\n
'
)
...
...
@@ -32,7 +33,7 @@ def killprocs( pattern ):
pids
=
''
if
pids
:
sh
(
'
pkill -f 9 mininet:
'
)
sleep
(
.
5
)
time
.
sleep
(
.
5
)
else
:
break
...
...
@@ -49,7 +50,7 @@ def cleanup():
# you can't connect to them either, so they're mostly harmless.
# Send SIGTERM first to give processes a chance to shutdown cleanly.
sh
(
'
killall
'
+
zombies
+
'
2> /dev/null
'
)
time
.
sleep
(
1
)
time
.
sleep
(
1
)
sh
(
'
killall -9
'
+
zombies
+
'
2> /dev/null
'
)
# And kill off sudo mnexec
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment