-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade libcontainer to 1d3b2589d734dc94a1719a3af4
Correct exit code when dying on a signal (fixes moby#9979). Signed-off-by: Arnaud Porterie <[email protected]>
- Loading branch information
Arnaud Porterie
committed
Jan 13, 2015
1 parent
9b0072a
commit 009041c
Showing
5 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package main | ||
|
||
import ( | ||
"log" | ||
|
||
"github.com/codegangsta/cli" | ||
"github.com/docker/libcontainer" | ||
) | ||
|
||
var oomCommand = cli.Command{ | ||
Name: "oom", | ||
Usage: "display oom notifications for a container", | ||
Action: oomAction, | ||
} | ||
|
||
func oomAction(context *cli.Context) { | ||
state, err := libcontainer.GetState(dataPath) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
n, err := libcontainer.NotifyOnOOM(state) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
for _ = range n { | ||
log.Printf("OOM notification received") | ||
} | ||
} |