mirror of
https://github.com/mumble-voip/grumble.git
synced 2025-12-19 21:59:59 -08:00
20 lines
430 B
Go
20 lines
430 B
Go
// Copyright (c) 2011 The Grumble Authors
|
|
// The use of this source code is goverened by a BSD-style
|
|
// license that can be found in the LICENSE-file.
|
|
|
|
package blobstore
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
func getPid() uint64 {
|
|
handle, _ := syscall.GetCurrentProcess()
|
|
return uint64(handle)
|
|
}
|
|
|
|
func pidRunning(pid uint64) bool {
|
|
var status uint32
|
|
syscall.GetExitCodeProcess(uint32(pid), &status)
|
|
return status == 259 // STILL_ACTIVE
|
|
}
|