File tree 2 files changed +35
-0
lines changed
2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ func main() {
61
61
restoreCommand ,
62
62
killCommand ,
63
63
specCommand ,
64
+ pauseCommand ,
65
+ unpauseCommand ,
64
66
}
65
67
app .Before = func (context * cli.Context ) error {
66
68
if context .GlobalBool ("debug" ) {
Original file line number Diff line number Diff line change
1
+ // +build linux
2
+
3
+ package main
4
+
5
+ import "github.com/codegangsta/cli"
6
+
7
+ var pauseCommand = cli.Command {
8
+ Name : "pause" ,
9
+ Usage : "pause suspends all processes inside the container" ,
10
+ Action : func (context * cli.Context ) {
11
+ container , err := getContainer (context )
12
+ if err != nil {
13
+ fatal (err )
14
+ }
15
+ if err := container .Pause (); err != nil {
16
+ fatal (err )
17
+ }
18
+ },
19
+ }
20
+
21
+ var unpauseCommand = cli.Command {
22
+ Name : "unpause" ,
23
+ Usage : "unpause resumes all processes that have been previously paused" ,
24
+ Action : func (context * cli.Context ) {
25
+ container , err := getContainer (context )
26
+ if err != nil {
27
+ fatal (err )
28
+ }
29
+ if err := container .Resume (); err != nil {
30
+ fatal (err )
31
+ }
32
+ },
33
+ }
You can’t perform that action at this time.
0 commit comments