Stop kills the background frame buffer process and removes the X authorization file.
()
| 393 | // Stop kills the background frame buffer process and removes the X |
| 394 | // authorization file. |
| 395 | func (f FrameBuffer) Stop() error { |
| 396 | if err := f.cmd.Process.Kill(); err != nil { |
| 397 | return err |
| 398 | } |
| 399 | os.Remove(f.AuthPath) // best effort removal; ignore error |
| 400 | if err := f.cmd.Wait(); err != nil && err.Error() != "signal: killed" { |
| 401 | return err |
| 402 | } |
| 403 | return nil |
| 404 | } |