search for: errorfd

Displaying 15 results from an estimated 15 matches for "errorfd".

2020 Feb 26
2
[PATCH] lib: command: switch from select() to poll()
...int loop (struct command *cmd) { - fd_set rset, rset2; - int maxfd = -1, r; + struct pollfd fds[2]; + int r; size_t nr_fds = 0; CLEANUP_FREE char *buf = safe_malloc (cmd->g, BUFSIZ); ssize_t n; - FD_ZERO (&rset); + memset (&fds, 0, sizeof fds); + + fds[0].fd = cmd->errorfd; + fds[1].fd = cmd->outfd; if (cmd->errorfd >= 0) { - FD_SET (cmd->errorfd, &rset); - maxfd = MAX (cmd->errorfd, maxfd); + fds[0].events = POLLIN; nr_fds++; } if (cmd->outfd >= 0) { - FD_SET (cmd->outfd, &rset); - maxfd = MAX (cmd-&g...
2020 Feb 26
1
Re: [PATCH] lib: command: switch from select() to poll()
...pollfd fds[2]; > > + int r; > > size_t nr_fds = 0; > > CLEANUP_FREE char *buf = safe_malloc (cmd->g, BUFSIZ); > > ssize_t n; > > > > - FD_ZERO (&rset); > > + memset (&fds, 0, sizeof fds); > > + > > + fds[0].fd = cmd->errorfd; > > + fds[1].fd = cmd->outfd; > > > > if (cmd->errorfd >= 0) { > > - FD_SET (cmd->errorfd, &rset); > > - maxfd = MAX (cmd->errorfd, maxfd); > > + fds[0].events = POLLIN; > > nr_fds++; > > } > > > &...
2020 Feb 26
0
Re: [PATCH] lib: command: switch from select() to poll()
...2; > - int maxfd = -1, r; > + struct pollfd fds[2]; > + int r; > size_t nr_fds = 0; > CLEANUP_FREE char *buf = safe_malloc (cmd->g, BUFSIZ); > ssize_t n; > > - FD_ZERO (&rset); > + memset (&fds, 0, sizeof fds); > + > + fds[0].fd = cmd->errorfd; > + fds[1].fd = cmd->outfd; > > if (cmd->errorfd >= 0) { > - FD_SET (cmd->errorfd, &rset); > - maxfd = MAX (cmd->errorfd, maxfd); > + fds[0].events = POLLIN; > nr_fds++; > } > > if (cmd->outfd >= 0) { > - FD_S...
2004 Jul 14
12
HP-UX 11i and largefiles on rsync 2.6.2
Hello, I'm running HP-UX 11i on an rp74xx. It's 64-bit. C compiler is as follows: B3901BA B.11.11.03 HP C/ANSI C Developer's Bundle for HP-UX 11.i (S800) B3913DB C.03.30.02 HP aC++ Compiler (S800) /usr/bin/cc: LINT B.11.11.02 CXREF B.11.11.02 HP92453-01 B.11.11.02 HP C Compiler $ Sep 8 2000 23:13:51 $ I have successfully compiled rsync 2.6.2 and it
2015 Sep 29
8
[PATCH 0/7] copy-in/copy-out: Capture errors from tar subprocess (RHBZ#1267032).
Commits 3c27f3d91e1566854747bbe844186783fc84f3a8 and 1b6f0daa9ae7fcc94e389232d0c397816cda973d added an internal API for running commands asynchronously. It is only used by the copy-in and copy-out APIs. Unfortunately this made the command code very complex: it was almost impossible to redirect stderr to a file, and there were a lot of long-range dependencies through the file. It was also buggy:
2012 Oct 18
10
[PATCH 0/10] Add a mini-library for running external commands.
Inspired by libvirt's virCommand* internal mini-library, this adds some internal APIs for running commands. The first patch contains the new APIs. The subsequent patches change various parts of the library over to use it. Rich.
2015 Feb 02
8
[PATCH 0/7 v2] Make copy_in & copy_out APIs, and use copy_in in customize
Hi, attached there is the second version of the patch series adding copy_in and copy_out in the library, mostly moving them from guestfish. It also adds the copy_in usage in virt-customize, as aid in a new image building. Thanks, Pino Toscano (7): cmd: add a way to run (and wait) asynchronously commands cmd: add a child-setup callback cmd: add the possibility to get a fd to the process
2015 Jan 26
6
[PATCH 1/6] cmd: add a way to run (and wait) asynchronously commands
...us_string[80]; + get_stdout_fd = get_stdout_fd || cmd->stdout_callback != NULL; + get_stderr_fd = get_stderr_fd || cmd->capture_errors; + /* Set up a pipe to capture command output and send it to the error log. */ - if (cmd->capture_errors) { + if (get_stderr_fd) { if (pipe2 (errorfd, O_CLOEXEC) == -1) { perrorf (cmd->g, "pipe2"); goto error; @@ -377,7 +380,7 @@ run_command (struct command *cmd) } /* Set up a pipe to capture stdout for the callback. */ - if (cmd->stdout_callback) { + if (get_stdout_fd) { if (pipe2 (outfd, O_CLOEXEC)...
2023 Jul 11
1
[libguestfs PATCH] lib: remove guestfs_int_cmd_clear_close_files()
.../* Supply a callback to receive stdout. */ cmd_stdout_callback stdout_callback; void *stdout_data; @@ -186,7 +183,6 @@ guestfs_int_new_command (guestfs_h *g) cmd = safe_calloc (g, 1, sizeof *cmd); cmd->g = g; cmd->capture_errors = true; - cmd->close_files = true; cmd->errorfd = -1; cmd->outfd = -1; return cmd; @@ -358,17 +354,6 @@ guestfs_int_cmd_clear_capture_errors (struct command *cmd) cmd->capture_errors = false; } -/** - * Don't close file descriptors after the fork. - * - * XXX Should allow single fds to be sent to child process. - */ -void -...
2001 Jul 03
2
2.9p?: connection hangs with agent forwarding
Hi! when using agent forwarding, the connection hangs on exit, if the agent has been accessed. Symptoms: - On the client side, when the agent is accessed, the following output is being logged: debug1: channel 1: new [authentication agent connection] debug1: confirm auth-agent at openssh.com debug1: channel 1: rcvd eof debug1: channel 1: output open -> drain debug1: channel 1: obuf empty
2008 Aug 05
1
Also seeing high winbindd CPU usage
I think somebody had a similar problem (also on Solaris), but that thread seemed to die. I've compiled (with Sun Studio cc) and installed samba-3.2.1 on a Solaris 10 x64 box, which is a member of a (Windows Server 2003 controlled) domain. I previously had samba 3.0.28a running on the same machine without any problems. Now winbindd is eating up all of the CPU (on the CPU it's assigned
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.
2016 Mar 07
2
[PATCH v2] Use less stack.
...-607,7 +607,7 @@ loop (struct command *cmd) fd_set rset, rset2; int maxfd = -1, r; size_t nr_fds = 0; - char buf[BUFSIZ]; + CLEANUP_FREE char *buf = safe_malloc (cmd->g, BUFSIZ); ssize_t n; FD_ZERO (&rset); @@ -636,7 +636,7 @@ loop (struct command *cmd) if (cmd->errorfd >= 0 && FD_ISSET (cmd->errorfd, &rset2)) { /* Read output and send it to the log. */ - n = read (cmd->errorfd, buf, sizeof buf); + n = read (cmd->errorfd, buf, BUFSIZ); if (n > 0) guestfs_int_call_callbacks_message (cmd->g, GUESTFS_EVEN...
2014 Feb 13
3
Libguestfs (1.22.6) driver/changes for mingw/win32
Hi, I attached the changes I made to a vanilla libguestfs-1.22.6 in order to make it work in mingw/win32. Added is also the patch required to make QEMU compatible (add a command to QMP that lists the supported devices (the regilat way you do it print it to stderr, which is difficult to redirect in win32)). This is done on behalf of Intel Corp. Thanks, Or (oberon in irc)
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.