summaryrefslogtreecommitdiff
path: root/coredump-handler
diff options
context:
space:
mode:
authorlinxin <[email protected]>2023-07-19 17:29:10 +0800
committerlinxin <[email protected]>2023-07-19 17:29:10 +0800
commit657cca128e671e0042da26ec94b4063debe0f187 (patch)
tree443e5c23d6aefbabf4c87f24e60f50fe7fe13a18 /coredump-handler
parent37a2f20d3b3049c53e6e5c2c85fbfe28564b500a (diff)
修复coredump-tool数据读取不全的问题bugfix-15646
Diffstat (limited to 'coredump-handler')
-rw-r--r--coredump-handler/coredump-handler.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/coredump-handler/coredump-handler.go b/coredump-handler/coredump-handler.go
index 554980d..c4c57a9 100644
--- a/coredump-handler/coredump-handler.go
+++ b/coredump-handler/coredump-handler.go
@@ -359,6 +359,21 @@ func main() {
//write coredump info
err = writeCoreConfig(coredump_config)
if err != nil {
+ journal.Print(journal.PriErr, err.Error())
+ }
+ flag, err = isDiskSufficient(pipe_config)
+ if err != nil {
+ journal.Print(journal.PriErr, "Can't judge disk's space is sufficient or not. "+err.Error())
+ return
+ }
+ if !flag {
+ journal.Print(journal.PriErr, "Disk space exceeds limit after write coredump!")
+ err := os.RemoveAll(pipe_config.Storage)
+ if err != nil {
+ journal.Print(journal.PriErr, err.Error())
+ return
+ }
journal.Print(journal.PriInfo, err.Error())
+ return
}
}