File: singularity.go

package info (click to toggle)
singularity-container 4.1.5%2Bds4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 43,876 kB
  • sloc: asm: 14,840; sh: 3,190; ansic: 1,751; awk: 414; makefile: 413; python: 99
file content (28 lines) | stat: -rw-r--r-- 1,192 bytes parent folder | download
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
// Copyright (c) 2020, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
// LICENSE.md file distributed with the URIs of this project regarding your
// rights to use or distribute this software.

package singularity

import (
	"os"
	"syscall"

	"github.com/sylabs/singularity/v4/pkg/runtime/engine/config"
)

// MonitorContainer callback allows to monitor container process.
// The plugin callback must implement the signal handler responsible
// of tracking container process status, it's also responsible to
// propagate signals to container process. If more than one plugin
// uses this callback the runtime aborts its execution.
// This callback is called in:
// - internal/pkg/runtime/engine/singularity/monitor_linux.go
type MonitorContainer func(config *config.Common, pid int, signals chan os.Signal) (syscall.WaitStatus, error)

// PostStartProcess callback is called after the container process
// started. It's a good place to add custom logger and/or notifier.
// This callback is called in:
// - internal/pkg/runtime/engine/singularity/process_linux.go
type PostStartProcess func(config *config.Common, pid int) error