mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
16 lines
368 B
Go
16 lines
368 B
Go
package modules
|
|
|
|
var (
|
|
exitStatusCode int
|
|
)
|
|
|
|
// SetExitStatusCode sets the exit code that the program shell return to the host after shutdown.
|
|
func SetExitStatusCode(n int) {
|
|
exitStatusCode = n
|
|
}
|
|
|
|
// GetExitStatusCode waits for the shutdown to complete and then returns the exit code
|
|
func GetExitStatusCode() int {
|
|
<-shutdownCompleteSignal
|
|
return exitStatusCode
|
|
}
|