Displaying 20 results from an estimated 24 matches for "out_fd".
2019 Aug 27
2
[PATCH nbdkit] sh: Remove assert and replace with smarter file descriptor duplication. (was: Re: [nbdkit PATCH v2 14/17] sh: Use pipe2 with CLOEXEC when possible)
...rent process were not empty
> + * before we started creating pipes (otherwise, the close and dup2
> + * calls below become more complex to juggle fds around correctly).
> + */
> + assert (in_fd[0] > STDERR_FILENO && in_fd[1] > STDERR_FILENO &&
> + out_fd[0] > STDERR_FILENO && out_fd[1] > STDERR_FILENO &&
> + err_fd[0] > STDERR_FILENO && err_fd[1] > STDERR_FILENO);
This assert is now being thrown whenever we use nbdkit + sh plugin +
nbdkit -s option. It's easy to demonstrate using a libnbd one-li...
2019 Aug 27
0
Re: [PATCH nbdkit] sh: Remove assert and replace with smarter file descriptor duplication. (was: Re: [nbdkit PATCH v2 14/17] sh: Use pipe2 with CLOEXEC when possible)
...t empty
>> + * before we started creating pipes (otherwise, the close and dup2
>> + * calls below become more complex to juggle fds around correctly).
>> + */
>> + assert (in_fd[0] > STDERR_FILENO && in_fd[1] > STDERR_FILENO &&
>> + out_fd[0] > STDERR_FILENO && out_fd[1] > STDERR_FILENO &&
>> + err_fd[0] > STDERR_FILENO && err_fd[1] > STDERR_FILENO);
>
> This assert is now being thrown whenever we use nbdkit + sh plugin +
> nbdkit -s option. It's easy to demonstrate us...
2019 Aug 27
1
Re: [PATCH nbdkit] sh: Remove assert and replace with smarter file descriptor duplication. (was: Re: [nbdkit PATCH v2 14/17] sh: Use pipe2 with CLOEXEC when possible)
...+ * before we started creating pipes (otherwise, the close and dup2
>>> + * calls below become more complex to juggle fds around correctly).
>>> + */
>>> + assert (in_fd[0] > STDERR_FILENO && in_fd[1] > STDERR_FILENO &&
>>> + out_fd[0] > STDERR_FILENO && out_fd[1] > STDERR_FILENO &&
>>> + err_fd[0] > STDERR_FILENO && err_fd[1] > STDERR_FILENO);
>>
>> This assert is now being thrown whenever we use nbdkit + sh plugin +
>> nbdkit -s option. It's easy to...
2019 Aug 02
0
[nbdkit PATCH v2 14/17] sh: Use pipe2 with CLOEXEC when possible
...pes.h>
@@ -94,6 +96,27 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin */
*rbuflen = *ebuflen = 0;
rbufalloc = ebufalloc = 0;
+#ifdef HAVE_PIPE2
+ if (pipe2 (in_fd, O_CLOEXEC) == -1) {
+ nbdkit_error ("%s: pipe2: %m", script);
+ goto error;
+ }
+ if (pipe2 (out_fd, O_CLOEXEC) == -1) {
+ nbdkit_error ("%s: pipe2: %m", script);
+ goto error;
+ }
+ if (pipe2 (err_fd, O_CLOEXEC) == -1) {
+ nbdkit_error ("%s: pipe2: %m", script);
+ goto error;
+ }
+#else
+ /* Without pipe2, we leave .fork_safe at 0 which forces
+ * NBDKIT_THR...
2010 Mar 11
2
[PATCH FOR DISCUSSION ONLY] Rewrite libguestfs-supermin-helper in C.
...opy_padding (size_t len);
+static char **load_file (const char *filename);
+static void cpio_append_fts_entry (FTSENT *entry);
+static void cpio_append_stat (const char *filename, struct stat *);
+static void cpio_append (const char *filename);
+static void cpio_append_trailer (void);
+
+static int out_fd = -1;
+static off_t out_offset = 0;
+
+/* Create the appliance.
+ *
+ * The initrd consists of these components concatenated together:
+ *
+ * (1) The base skeleton appliance that we constructed at build time.
+ * name = initramfs.$repo.$host_cpu.supermin.img
+ * format = plain cpio
+ * (2)...
2012 May 11
15
Errors of doing "make install-tools" with xen-4.2-unstable?
Hi,
When I do the "make install-tools" with xen-4.2-unstable, there are some
errors about "warn_unused_result".
Is it the error in code or the error in the compiling environment? Thank
you so much.
gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99
-Wall -Wstrict-prototypes -Wdeclaration-after-statement -D__XEN_TOOLS__
-MMD -MF .tapdisk-queue.o.d
2019 Aug 27
0
[nbdkit PATCH] server: Enforce sane stdin/out/err
...ommand (["nbdkit","sh","script",
"-s","--exit-with-parent"])' -c 'print("%r"%h.get_size())'
1048576
nbdkit: call.c:155: call3: Assertion `in_fd[0] > STDERR_FILENO && in_fd[1] > STDERR_FILENO && out_fd[0] > STDERR_FILENO && out_fd[1] > STDERR_FILENO && err_fd[0] > STDERR_FILENO && err_fd[1] > STDERR_FILENO' failed.
With this patch, the assertion can remain in place.
Reported-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Eric Blake <e...
2012 Aug 09
8
[PATCH V2 0/6] virtio-trace: Support virtio-trace
Hi All,
The following patch set provides a low-overhead system for collecting kernel
tracing data of guests by a host in a virtualization environment.
A guest OS generally shares some devices with other guests or a host, so
reasons of any problems occurring in a guest may be from other guests or a host.
Then, to collect some tracing data of a number of guests and a host is needed
when some
2012 Aug 09
8
[PATCH V2 0/6] virtio-trace: Support virtio-trace
Hi All,
The following patch set provides a low-overhead system for collecting kernel
tracing data of guests by a host in a virtualization environment.
A guest OS generally shares some devices with other guests or a host, so
reasons of any problems occurring in a guest may be from other guests or a host.
Then, to collect some tracing data of a number of guests and a host is needed
when some
2018 Dec 01
1
[nbdkit PATCH] sh: Don't let child inherit SIGPIPE ignored
...ell.sh | 14 +++++++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/plugins/sh/call.c b/plugins/sh/call.c
index 9b3eca8..42923da 100644
--- a/plugins/sh/call.c
+++ b/plugins/sh/call.c
@@ -121,6 +121,9 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin */
close (out_fd[1]);
close (err_fd[1]);
+ /* Restore SIGPIPE back to SIG_DFL, since shell can't undo SIG_IGN */
+ signal (SIGPIPE, SIG_DFL);
+
/* Set $tmpdir for the script. */
setenv ("tmpdir", tmpdir, 1);
diff --git a/tests/test-shell.sh b/tests/test-shell.sh
index ef438ec..e...
2012 Jul 24
13
[RFC PATCH 0/6] virtio-trace: Support virtio-trace
Hi All,
The following patch set provides a low-overhead system for collecting kernel
tracing data of guests by a host in a virtualization environment.
A guest OS generally shares some devices with other guests or a host, so
reasons of any problems occurring in a guest may be from other guests or a host.
Then, to collect some tracing data of a number of guests and a host is needed
when some
2012 Jul 24
13
[RFC PATCH 0/6] virtio-trace: Support virtio-trace
Hi All,
The following patch set provides a low-overhead system for collecting kernel
tracing data of guests by a host in a virtualization environment.
A guest OS generally shares some devices with other guests or a host, so
reasons of any problems occurring in a guest may be from other guests or a host.
Then, to collect some tracing data of a number of guests and a host is needed
when some
2011 Jun 26
0
[PATCH] mkfs.btrfs: Fix compilation errors with gcc 4.6
...++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/mkfs.c b/mkfs.c
index 3a87d6e..edd7018 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -750,7 +750,7 @@ static int add_file_items(struct btrfs_trans_handle *trans,
ino_t parent_inum, struct stat *st,
const char *path_name, int out_fd)
{
- int ret;
+ int ret = -1;
ssize_t ret_read;
u64 bytes_read = 0;
char *buffer = NULL;
@@ -889,7 +889,7 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
ret = btrfs_lookup_inode(trans, root, &path, &root_dir_key, 1);
if (ret) {
fprintf(stderr, "root di...
2013 Sep 06
2
[PATCH supermin 0/2] helper: Implement device trees.
This two-part patch for supermin implements device trees (for ARM).
The first patch introduces a more rational way to handle command line
arguments in 'supermin-helper'. See the commit message for details.
The old style is still supported for compatibility.
The second patch adds an extra supermin-helper --dtb parameter
specifying a wildcard. A device tree file which matches the
2013 Sep 05
12
[PATCH 0/5] Memory leaks amended
Memory leaks found by the tool--valgrind along with static reviewing.
Based on Daivd''s branch ''integration-20130903''.
Gui Hecheng (5):
btrfs-progs:free local variable buf upon unsuccessful returns
btrfs-progs:local variable memory freed
btrfs-progs: missing tree-freeing statements added
btrfs-progs:free the local list pending_list in btrfs_scan_one_dir
2019 Aug 02
23
[nbdkit PATCH v2 00/17] fd leak safety
This is a major rewrite compared to my v1 series, where I've tried
a lot harder to ensure that we still accommodate building on Haiku
(although I have not actually yet fired up a Haiku VM to try it
for myself). I also managed to make the sh plugin fully parallel,
on capable platforms.
See also my question on patch 10 on whether I've picked the best
naming convention.
Eric Blake (17):
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...-#include "fts_.h"
-#include "full-write.h"
-#include "xalloc.h"
-#include "xvasprintf.h"
-
-#include "helper.h"
-
-/* Buffer size used in copy operations throughout. Large for
- * greatest efficiency.
- */
-#define BUFFER_SIZE 65536
-
-static int out_fd = -1;
-static off_t out_offset = 0;
-
-static void write_file_to_fd (const char *filename);
-static void write_file_len_to_fd (const char *filename, size_t len);
-static void write_padding (size_t len);
-static void cpio_append_fts_entry (FTSENT *entry);
-static void cpio_append_stat (const char *f...
2012 Nov 21
6
[PATCH 0/6] VSOCK for Linux upstreaming
* * *
This series of VSOCK linux upstreaming patches include latest udpate from
VMware.
Summary of changes:
- Sparse clean.
- Checkpatch clean with one exception, a "complex macro" in
which we can't add parentheses.
- Remove all runtime assertions.
- Fix device name, so that existing user clients work.
- Fix VMCI handle lookup.
* *
2012 Nov 21
6
[PATCH 0/6] VSOCK for Linux upstreaming
* * *
This series of VSOCK linux upstreaming patches include latest udpate from
VMware.
Summary of changes:
- Sparse clean.
- Checkpatch clean with one exception, a "complex macro" in
which we can't add parentheses.
- Remove all runtime assertions.
- Fix device name, so that existing user clients work.
- Fix VMCI handle lookup.
* *
2018 Mar 01
29
[Bug 13317] New: rsync returns success when target filesystem is full
https://bugzilla.samba.org/show_bug.cgi?id=13317
Bug ID: 13317
Summary: rsync returns success when target filesystem is full
Product: rsync
Version: 3.1.2
Hardware: x64
OS: FreeBSD
Status: NEW
Severity: major
Priority: P5
Component: core
Assignee: wayned at samba.org