MCPcopy Create free account
hub / github.com/DOSNetwork/core / savePID

Function savePID

main.go:40–55  ·  view source on GitHub ↗
(pid int)

Source from the content-addressed store, hash-verified

38}
39
40func savePID(pid int) {
41 file, err := os.Create(pidFile)
42 if err != nil {
43 fmt.Printf("Unable to create pid file : %v\n", err)
44 os.Exit(1)
45 }
46
47 defer file.Close()
48
49 _, err = file.WriteString(strconv.Itoa(pid))
50 if err != nil {
51 fmt.Printf("Unable to create pid file : %v\n", err)
52 os.Exit(1)
53 }
54 file.Sync() // flush to disk
55}
56
57func makeRequest(f string) ([]byte, error) {
58

Callers 1

actionStartFunction · 0.85

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected