On Thursday, 16 May 2019 at 17:49:24 UTC, Adam D. Ruppe wrote:
On Thursday, 16 May 2019 at 14:53:14 UTC, Alex wrote:
I have some code that disables the console because some other
code puts junk on it that I don't want to see
s stupid question but can't you just edit the other code to
not
On Thursday, 16 May 2019 at 14:53:14 UTC, Alex wrote:
I have some code that disables the console because some other
code puts junk on it that I don't want to see
s stupid question but can't you just edit the other code to
not put junk on it?
Maybe there is some other approach we can try
On Thursday, 16 May 2019 at 17:42:17 UTC, Alex wrote:
I'm not sure if they are failing to block or if they are
blocking what is being opened(and not the original console).
That is, do I need to not open and simply close stdout?
Yes, I see. It won't work because the two libraries are using
dif
On Thursday, 16 May 2019 at 17:19:13 UTC, Vladimir Panteleev
wrote:
On Thursday, 16 May 2019 at 17:18:01 UTC, Alex wrote:
adding
int dup(int) @trusted;
int dup2(int, int) @trusted;
int close(int) @trusted;
int open(in char*, int, ...) @trusted;
Be sure to make
On Thursday, 16 May 2019 at 17:18:01 UTC, Alex wrote:
adding
int dup(int) @trusted;
int dup2(int, int) @trusted;
int close(int) @trusted;
int open(in char*, int, ...) @trusted;
Be sure to make them extern(C).
Sorry, I haven't tried it, I'm guessing that it shou
On Thursday, 16 May 2019 at 17:07:39 UTC, Vladimir Panteleev
wrote:
On Thursday, 16 May 2019 at 17:05:01 UTC, Alex wrote:
One thing you could try is going one level lower, and using
dup() to save the stream to another fd, close() to close the
stdout one, and dup2() to restore the saved fd over
On Thursday, 16 May 2019 at 15:21:48 UTC, Vladimir Panteleev
wrote:
On Thursday, 16 May 2019 at 14:53:14 UTC, Alex wrote:
I have some code that disables the console because some other
code puts junk on it that I don't want to see... then I enable
it.
One thing you could try is going one level
On Thursday, 16 May 2019 at 17:05:01 UTC, Alex wrote:
One thing you could try is going one level lower, and using
dup() to save the stream to another fd, close() to close the
stdout one, and dup2() to restore the saved fd over the stdout
one.
Unfortunately D doesn't seem to have dup, dup2.
On Thursday, 16 May 2019 at 14:53:14 UTC, Alex wrote:
I have some code that disables the console because some other
code puts junk on it that I don't want to see... then I enable
it.
One thing you could try is going one level lower, and using dup()
to save the stream to another fd, close() to