actions: properly release resources once the external command exits
This commit is contained in:
parent
838426b3a4
commit
25fb639465
1 changed files with 4 additions and 1 deletions
|
@ -321,8 +321,11 @@ func executeAction(operation string, username string, path string, target string
|
|||
if _, err = os.Stat(actions.Command); err == nil {
|
||||
command := exec.Command(actions.Command, operation, username, path, target)
|
||||
err = command.Start()
|
||||
logger.Debug(logSender, "executed command \"%v\" with arguments: %v, %v, %v, %v, error: %v",
|
||||
logger.Debug(logSender, "start command \"%v\" with arguments: %v, %v, %v, %v, error: %v",
|
||||
actions.Command, operation, username, path, target, err)
|
||||
if err == nil {
|
||||
go command.Wait()
|
||||
}
|
||||
} else {
|
||||
logger.Warn(logSender, "Invalid action command \"%v\" : %v", actions.Command, err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue