libgocryptfs/sendusr1.go
Jakob Unterwurzacher 6c3f97399a Rename internal "toggledlog" package to "tlog"
tlog is used heavily everywhere and deserves a shorter name.

Renamed using sed magic, without any manual rework:

   find * -type f -exec sed -i 's/toggledlog/tlog/g' {} +
2016-06-15 23:30:44 +02:00

23 lines
459 B
Go

package main
import (
"os"
"syscall"
"github.com/rfjakob/gocryptfs/internal/tlog"
)
// Send signal USR1 to "pid" (usually our parent process). This notifies it
// that the mounting has completed sucessfully.
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)
}
}