Enable building on unsupported systems
This commit is contained in:
28
process/process_default.go
Normal file
28
process/process_default.go
Normal file
@@ -0,0 +1,28 @@
|
||||
//+build !windows,!linux
|
||||
|
||||
package process
|
||||
|
||||
// IsUser returns whether the process is run by a normal user.
|
||||
func (p *Process) IsUser() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsAdmin returns whether the process is run by an admin user.
|
||||
func (p *Process) IsAdmin() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsSystem returns whether the process is run by the operating system.
|
||||
func (p *Process) IsSystem() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsKernel returns whether the process is the Kernel.
|
||||
func (p *Process) IsKernel() bool {
|
||||
return p.Pid == 0
|
||||
}
|
||||
|
||||
// specialOSInit does special OS specific Process initialization.
|
||||
func (p *Process) specialOSInit() {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user