func WaitOrphans() uint {
	var numReaped uint
	for {
		var (
			w syscall.Waitmsg
		)
		err := syscall.Await(&w)
		if err != nil {
			break
		}
		log.Printf("Exited with %v", w)
		numReaped++
	}
	return numReaped
}
WaitOrphans waits for all remaining processes on the system to exit.
package libinit
import (
	"log"
	"os"
	"os/exec"
	"syscall"
)