func receiveExitStatus(commandUsock *unixsocket.Usock, err error) (string, error) { if err != nil { return "", err } return commandUsock.ReadMessage() }
func receivePidFromCommand(commandUsock *unixsocket.Usock, err error) (int, error) { if err != nil { return -1, err } msg, err := commandUsock.ReadMessage() if err != nil { return -1, err } intPid, _, _ := messages.ParsePidMessage(msg) return intPid, err }
func receiveCommandArgumentsAndPid(usock *unixsocket.Usock, err error) (string, int, string, error) { if err != nil { return "", -1, "", err } msg, err := usock.ReadMessage() if err != nil { return "", -1, "", err } command, clientPid, arguments, err := messages.ParseClientCommandRequestMessage(msg) if err != nil { return "", -1, "", err } return command, clientPid, arguments, err }