(containerID string)
| 274 | } |
| 275 | |
| 276 | func (f *Funclet) GetPidFromFile(containerID string) (pid int, err error) { |
| 277 | paths, err := f.PathManager.GetPaths(containerID) |
| 278 | if err != nil { |
| 279 | return 0, err |
| 280 | } |
| 281 | path := filepath.Join(paths.RunnerSpecPath, "runner.pid") |
| 282 | d, err := ioutil.ReadFile(path) |
| 283 | if err != nil { |
| 284 | return 0, err |
| 285 | } |
| 286 | pid, err = strconv.Atoi(string(bytes.TrimSpace(d))) |
| 287 | if err != nil { |
| 288 | return 0, fmt.Errorf("error parsing pid from %s: %s", path, err) |
| 289 | } |
| 290 | return pid, nil |
| 291 | } |
| 292 | |
| 293 | func (f *Funclet) RemoveTmpDevice(ctx *funcletCtx.Context, pathName string) { |
| 294 | if err := f.TmpManager.RemoveTmpStorage(pathName); err != nil { |
no test coverage detected