1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
//go:build windows
package subprocess
import (
"context"
"fmt"
"os"
)
// Process struct. Has ability to set runtime arguments.
type Process struct{}
// GetPid returns the pid for the given process object.
func (p *Process) GetPid() (int64, error) {
return -1, fmt.Errorf("Windows isn't supported at this time")
}
// SetApparmor allows setting the AppArmor profile.
func (p *Process) SetApparmor(profile string) {}
// SetCreds allows setting process credentials.
func (p *Process) SetCreds(uid uint32, gid uint32) {}
// Stop will stop the given process object.
func (p *Process) Stop() error {
return fmt.Errorf("Windows isn't supported at this time")
}
// Start will start the given process object.
func (p *Process) Start(ctx context.Context) error {
return fmt.Errorf("Windows isn't supported at this time")
}
// StartWithFiles will start the given process object with extra file descriptors.
func (p *Process) StartWithFiles(ctx context.Context, fds []*os.File) error {
return fmt.Errorf("Windows isn't supported at this time")
}
// Restart stop and starts the given process object.
func (p *Process) Restart(ctx context.Context) error {
return fmt.Errorf("Windows isn't supported at this time")
}
// Reload sends the SIGHUP signal to the given process object.
func (p *Process) Reload() error {
return fmt.Errorf("Windows isn't supported at this time")
}
// Save will save the given process object to a YAML file. Can be imported at a later point.
func (p *Process) Save(path string) error {
return fmt.Errorf("Windows isn't supported at this time")
}
// Signal will send a signal to the given process object given a signal value.
func (p *Process) Signal(signal int64) error {
return fmt.Errorf("Windows isn't supported at this time")
}
// Wait will wait for the given process object exit code.
func (p *Process) Wait(ctx context.Context) (int64, error) {
return -1, fmt.Errorf("Windows isn't supported at this time")
}
|