search for: controllen

Displaying 4 results from an estimated 4 matches for "controllen".

Did you mean: controller
2009 Sep 11
1
[PATCH] guestfish: Redirect stdout when executing remote commands
...sys/un.h> #include <signal.h> +#include <sys/socket.h> #include <rpc/types.h> #include <rpc/xdr.h> @@ -49,6 +50,124 @@ create_sockpath (pid_t pid, char *sockpath, int len, struct sockaddr_un *addr) strcpy (addr->sun_path, sockpath); } +static const socklen_t controllen = CMSG_LEN (sizeof (int)); + +static void +receive_stdout (int s) +{ + static struct cmsghdr *cmptr = NULL, *h; + struct msghdr msg; + struct iovec iov[1]; + + /* Our 1 byte buffer */ + char buf[1]; + + if (NULL == cmptr) { + cmptr = malloc (controllen); + if (NULL == c...
2004 Aug 26
13
Load Balance simply doesn´t work...
i´ve been searching for a load balance solution since a month ago... what i can say is that it simply doesn´t work. I was unable to find one guy that did it with sucess. When "load balance" is the subject of the message on the list, the message is simply ignored. So... if it doesn´t work... why LARTC don´t delete it from the HOW TO and answer us with some "it simply doesn´t
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
...perror ("realloc"); free_n_strings (argv, argv_len-1); - exit (1); + exit (EXIT_FAILURE); } argv = argv_new; diff --git a/fish/rc.c b/fish/rc.c index a9eb578..dbaf953 100644 --- a/fish/rc.c +++ b/fish/rc.c @@ -66,7 +66,7 @@ receive_stdout (int s) cmptr = malloc (controllen); if (NULL == cmptr) { perror ("malloc"); - exit (1); + exit (EXIT_FAILURE); } } @@ -88,7 +88,7 @@ receive_stdout (int s) ssize_t n = recvmsg (s, &msg, 0); if (n < 0) { perror ("recvmsg stdout fd"); - exit (1); + exit (EXIT_...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...) error: - perror (dir); - exit (EXIT_FAILURE); - } + error (EXIT_FAILURE, errno, "%s", dir); if (lstat (dir, &statbuf) == -1) goto error; if (!S_ISDIR (statbuf.st_mode) || @@ -99,10 +98,8 @@ receive_stdout (int s) if (NULL == cmptr) { cmptr = malloc (controllen); - if (NULL == cmptr) { - perror ("malloc"); - exit (EXIT_FAILURE); - } + if (NULL == cmptr) + error (EXIT_FAILURE, errno, "malloc"); } /* Don't specify a source */ @@ -122,10 +119,8 @@ receive_stdout (int s) /* Read a message from the s...