Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
directionless committed Sep 15, 2023
1 parent 34ac487 commit 8869c07
Showing 1 changed file with 3 additions and 26 deletions.
29 changes: 3 additions & 26 deletions pkg/osquery/runsimple/osqueryrunner.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Package runsimple is meant as a simple runner for osquery. It is initial just handling one off executions, but may

Check failure on line 1 in pkg/osquery/runsimple/osqueryrunner.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

: # github.com/kolide/launcher/pkg/osquery/runsimple [github.com/kolide/launcher/pkg/osquery/runsimple.test]

Check failure on line 1 in pkg/osquery/runsimple/osqueryrunner.go

View workflow job for this annotation

GitHub Actions / lint (macos-latest)

: # github.com/kolide/launcher/pkg/osquery/runsimple [github.com/kolide/launcher/pkg/osquery/runsimple.test]
// perhaps, expand to also handling daemonization

package runsimple

import (
Expand Down Expand Up @@ -109,29 +112,3 @@ func (p osqueryProcess) RunVersion(ctx context.Context) error {

return cmd.Run()
}

/*
func (p *osqueryProcess) Execute(ctx context.Context) error {
// if this grows to replacing the larger osquery runtime, there are a lot of questions about how it will work.
// - cmd.Start does not block, Need to call cmd.Wait after it, So how do we manage the start, health, wait in the rest of the control flow?
// - Should osquery get it's own context? It makes some of the process management easier. But maybe not.
}
func (p *osqueryProcess) Stop() error {
proc := p.cmd.Process
if proc == nil {
return errors.New("No process. Missing start?")
}
err := cmd.Process.Signal(interrupt)
if err == nil {
err = ctx.Err() // Report ctx.Err() as the reason we interrupted.
} else if err.Error() == "os: process already finished" {
errc <- nil
}
}
*/

0 comments on commit 8869c07

Please sign in to comment.