On Saturday, 6 March 2021 at 21:20:30 UTC, kdevel wrote:
```pipechain.d
import std.stdio;
import std.process;
import std.conv;
import std.array;
import std.range;
import std.algorithm;
int main (string [] args)
{
auto p = pipe ();
auto proc1 = spawnProcess (["cat"], stdin, p.writeEnd);
On Saturday, 6 March 2021 at 01:53:15 UTC, Jesse Phillips wrote:
[...]
I think this post is going to answer your need.
https://dev.to/jessekphillips/piping-process-output-1cai
I haven't read all the replies, so maybe you have it working
and this will benefit someone else.
If I understand you
On Wednesday, 3 March 2021 at 20:43:54 UTC, Danny Arends wrote:
On Monday, 22 February 2021 at 14:52:22 UTC, frame wrote:
On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends
wrote:
https://github.com/DannyArends/DaNode/blob/master/danode/process.d
Danny
This example shows how easy it
On Wednesday, 17 February 2021 at 06:58:55 UTC, Jedi wrote:
I an using pipeShell, I have redirected stdout, stderr, and
stdin.
I am trying to read from the output and display it in my app. I
have followed this code almost exactly except I use try wait
and flush because the app is continuously
On Monday, 22 February 2021 at 14:52:22 UTC, frame wrote:
On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends wrote:
https://github.com/DannyArends/DaNode/blob/master/danode/process.d
Danny
This example shows how easy it is to implement a non-blocking
stream. Phobos knows this for soc
On Tuesday, 23 February 2021 at 10:07:03 UTC, Imperatorn wrote:
On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends wrote:
On Friday, 19 February 2021 at 15:39:25 UTC, kdevel wrote:
[...]
Perhaps a bit late, but this is how I deal with pipes and
spawnShell.
Read one byte at a time fro
On Thursday, 25 February 2021 at 15:28:25 UTC, kdevel wrote:
On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends wrote:
On Friday, 19 February 2021 at 15:39:25 UTC, kdevel wrote:
[...]
Fortunately the D runtime /does/ take care and it throws---if
the signal
is ignored beforehand. I fi
On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends wrote:
On Friday, 19 February 2021 at 15:39:25 UTC, kdevel wrote:
[...]
Fortunately the D runtime /does/ take care and it throws---if
the signal
is ignored beforehand. I filed issue 21649.
[...]
Perhaps a bit late,
It's never to
On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends wrote:
On Friday, 19 February 2021 at 15:39:25 UTC, kdevel wrote:
[...]
Perhaps a bit late, but this is how I deal with pipes and
spawnShell.
Read one byte at a time from stdout and stderr:
https://github.com/DannyArends/DaNode/blob/
On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends wrote:
https://github.com/DannyArends/DaNode/blob/master/danode/process.d
Danny
This example shows how easy it is to implement a non-blocking
stream. Phobos knows this for sockets but not for pipes?
On Friday, 19 February 2021 at 15:39:25 UTC, kdevel wrote:
On Friday, 19 February 2021 at 13:42:46 UTC, Steven
Schveighoffer wrote:
[...]
[...]
Sure.
[...]
As application programmer I don't want to check any error codes.
Thankfully I don't have to in D. There is a nice off-topic
exampl
On Friday, 19 February 2021 at 13:42:46 UTC, Steven Schveighoffer
wrote:
[...]
ignoring SIGPIPE is a process-wide thing, and so it's not
appropriate for Phobos to make that decision for you. But it's
trivial to ignore it.
Sure.
I've never been a fan of SIGPIPE. If you look around on the
I
On 2/19/21 5:41 AM, kdevel wrote:
On Friday, 19 February 2021 at 08:37:50 UTC, Imperatorn wrote:
Does your iopipe handle... Pipes? 😀
BTW: What about SIGPIPE?
In an experimental code I have this
  :
  fout.rawWrite (buf);
  fout.rawWrite ("\n");
  writeln ("flushing");
  fout.flush
On 2/19/21 3:37 AM, Imperatorn wrote:
On Thursday, 18 February 2021 at 17:27:48 UTC, Steven Schveighoffer wrote:
On 2/18/21 4:40 AM, frame wrote:
[...]
It's just the way it is. Everything in Phobos is a C FILE * (wrapped
in a File). You need to use alternative i/o systems to get the
informa
On Friday, 19 February 2021 at 08:37:50 UTC, Imperatorn wrote:
Does your iopipe handle... Pipes? 😀
BTW: What about SIGPIPE?
In an experimental code I have this
:
fout.rawWrite (buf);
fout.rawWrite ("\n");
writeln ("flushing");
fout.flush ();/
On Thursday, 18 February 2021 at 17:27:48 UTC, Steven
Schveighoffer wrote:
On 2/18/21 4:40 AM, frame wrote:
[...]
It's just the way it is. Everything in Phobos is a C FILE *
(wrapped in a File). You need to use alternative i/o systems to
get the information.
[...]
Does your iopipe handle
On Thursday, 18 February 2021 at 17:27:48 UTC, Steven
Schveighoffer wrote:
readln will block. eof doesn't tell you that there is no data
in the pipe, it just says whether the pipe has been closed.
Of course, I must have been thinking of another language - I
should take a coffee before postin
On 2/18/21 4:40 AM, frame wrote:
On Thursday, 18 February 2021 at 06:04:13 UTC, Jedi wrote:
Unfortunately, std.process wraps all the pipes in File structs, so
you have almost no good mechanisms to properly read the data.
WTF?
It's just the way it is. Everything in Phobos is a C FILE * (wra
On Thursday, 18 February 2021 at 06:04:13 UTC, Jedi wrote:
Unfortunately, std.process wraps all the pipes in File
structs, so you have almost no good mechanisms to properly
read the data.
WTF?
-Steve
I'm wonder about this message. You can always use readln() and
eof() on such kind of st
On Wednesday, 17 February 2021 at 14:36:58 UTC, Steven
Schveighoffer wrote:
On 2/17/21 1:58 AM, Jedi wrote:
I an using pipeShell, I have redirected stdout, stderr, and
stdin.
I am trying to read from the output and display it in my app.
I have followed this code almost exactly except I use tr
On 2/17/21 1:58 AM, Jedi wrote:
I an using pipeShell, I have redirected stdout, stderr, and stdin.
I am trying to read from the output and display it in my app. I have
followed this code almost exactly except I use try wait and flush
because the app is continuously updating the output. (it out
I an using pipeShell, I have redirected stdout, stderr, and stdin.
I am trying to read from the output and display it in my app. I
have followed this code almost exactly except I use try wait and
flush because the app is continuously updating the output. (it
outputs a progress text on the same
22 matches
Mail list logo