This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] An implementation of pipe to make I/O communication between gdb and shell. [MinGW question]

On Sun, 14 Aug 2011 16:08:32 +0200, Eli Zaretskii wrote:
> Where's the issue about which you need MinGW advice?
On Sat, 13 Aug 2011 22:50:54 +0200, Jan Kratochvil wrote:
# On Tue, 09 Aug 2011 12:42:25 +0200, Abhijit Halder wrote:
# > +       = pex_run (pipe->pex,
# Why PEX_STDERR_TO_STDOUT?  I am not so much against it but I do not see
# a reason for it.
# > +		  argv[0], argv,
# It does not work in one of the intended modes:
# (gdb) pipe | print 1 | cat >/dev/null
# cat: >/dev/null: No such file or directory
# You do not have to parse ARGV yourself, one can just run "/bin/sh", "-c",
# COMMAND, NULL (sure no PEX_SEARCH needed then).

> What exactly might not work?

Abhijit Halder has suggested the suggested
	const char *argv[] = { "sh", "-c", "cat >/dev/null", NULL };
	pex_run (pipe->pex, PEX_LAST, "/bin/sh", argv, NULL, NULL, &status);
works on UNIX but it will probably not work on MinGW as there is no "/bin/sh",
is it?

The current implementation:
	const char *argv[] = { "cat", ">/dev/null", NULL };
	pex_run (pipe->pex, PEX_SEARCH | PEX_LAST, "cat", argv, NULL, NULL, &status);
produces that - therefore not working on UNIX:
	cat: >/dev/null: No such file or directory


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]