blob: 7e654414b90d261f5f5ca6af543d36620959f01c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package main
import (
"os"
"syscall"
"github.com/rfjakob/gocryptfs/v2/internal/tlog"
)
// Send signal USR1 to "pid" (usually our parent process). This notifies it
// that the mounting has completed successfully.
func sendUsr1(pid int) {
p, err := os.FindProcess(pid)
if err != nil {
tlog.Warn.Printf("sendUsr1: FindProcess: %v\n", err)
return
}
err = p.Signal(syscall.SIGUSR1)
if err != nil {
tlog.Warn.Printf("sendUsr1: Signal: %v\n", err)
}
}
|