Displaying 17 results from an estimated 17 matches for "in_fd".
Did you mean:
in_d
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)
...2, 2019 at 02:26:15PM -0500, Eric Blake wrote:
> + /* Ensure that stdin/out/err of the current 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...
2019 Aug 02
0
[nbdkit PATCH v2 14/17] sh: Use pipe2 with CLOEXEC when possible
...de <assert.h>
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.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&q...
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)
...M -0500, Eric Blake wrote:
>> + /* Ensure that stdin/out/err of the current 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...
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)
...wrote:
>>> + /* Ensure that stdin/out/err of the current 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 asser...
2019 Aug 27
0
[nbdkit PATCH] server: Enforce sane stdin/out/err
...re-establishing stdin/out in the
parent process:
$ nbdsh -c 'h.connect_command (["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...
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
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
2019 Jul 31
0
[nbdkit PATCH 9/8] sh: Document CLOEXEC considerations
...ent to stdin */
*rbuflen = *ebuflen = 0;
rbufalloc = ebufalloc = 0;
+ /* As long as we use NBDKIT_THREAD_MODEL_SERIALIZE_ALL_REQUESTS, we
+ * don't have to worry about CLOEXEC, because we know no other
+ * thread is competing to fork at the same time as this one.
+ */
if (pipe (in_fd) == -1) {
nbdkit_error ("%s: pipe: %m", script);
goto error;
diff --git a/plugins/sh/sh.c b/plugins/sh/sh.c
index aeb01918..1e000b11 100644
--- a/plugins/sh/sh.c
+++ b/plugins/sh/sh.c
@@ -257,6 +257,9 @@ sh_config_complete (void)
}
}
+/* Do not change this to be more parall...
2015 Aug 31
3
COLUMNS and LINES environment variables
Hello openssh developers,
Instead of just playing nethack, I've been building a client that
would log in to nethack at alt.org and using a pipe to get the login data
from pwsafe directly onto the server.
All of this works brilliantly after playing with some stty magic (full
script in [0]), however, this way the terminal size is burned into
80x24, which is way smaller than my graphical
2020 Apr 15
0
[PATCH nbdkit 8/9] eval, sh: Set $tmpdir before running the command, instead of globally.
...ROR;
@@ -122,6 +123,11 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin */
debug_call (argv);
+ /* Copy the environment, and add $tmpdir. */
+ env = copy_environ (environ, "tmpdir", tmpdir, NULL);
+ if (env == NULL)
+ goto error;
+
#ifdef HAVE_PIPE2
if (pipe2 (in_fd, O_CLOEXEC) == -1) {
nbdkit_error ("%s: pipe2: %m", argv0);
@@ -184,6 +190,11 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin */
/* Restore SIGPIPE back to SIG_DFL, since shell can't undo SIG_IGN */
signal (SIGPIPE, SIG_DFL);
+ /* Note the assignment o...
2006 Jun 20
2
[PATCH] openssh pseudo-terminal bug
hello
short description:
ssh client sends a wrong all-zero terminal info when requesting forced pseudo-terminal
allocation while stdin is not a terminal.
sshd then sets the terminals ospeed to 0 because it receives this information from the
client. on solaris this means that the pseudo-terminal is closed and output of any
remote command is dropped.
longer description:
what we're doing is
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):
2019 Jul 31
13
[nbdkit PATCH 0/8] fd leak safety
There's enough here to need a review; some of it probably needs
backporting to stable-1.12.
This probably breaks tests on Haiku or other platforms that have not
been as on-the-ball about atomic CLOEXEC; feel free to report issues
that arise, and I'll help come up with workarounds (even if we end up
leaving a rare fd leak on less-capable systems).
Meanwhile, I'm still working on my
2007 Apr 18
7
[Bridge] (no subject)
Dear Sir,
I was trying to install bridge as we are installing
scps gateway in our testbed.This requires us to
install the bridge.
Our Linux version is 2.4.18 ~3 and we are using redhat
7.2
Please let me know which is the bridge I should
install and how to configure it.
Before configuring the bridge what I should check in
my configuration.
Thanks for your time,
Sincerely
Rama
=====
I hear
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated!
The basic purpose of the patch series is to set $nbdkit_stdio_safe to
"0" or "1" in sh and eval plugin scripts.
To do that, I ended up adding a nicer way to manipulate environ lists,
and to do that, I ended up adding a whole generic vector
implementation which is applicable in a lot of different places.