* GNAT.Expect on Windows, without terminal window
@ 2010-02-08 21:46 Gautier write-only
2010-02-14 13:38 ` Gautier write-only
0 siblings, 1 reply; 2+ messages in thread
From: Gautier write-only @ 2010-02-08 21:46 UTC (permalink / raw)
Hello,
A last problem (MS-Windows specific)...
The catching of an external process' output with GNAT.Expect is
working perfectly now... except if the main procedure is built without
an own terminal window (GNAT option: -largs -mwindows). Then, the
process is opening (or "someone" does it) a new terminal window and
the messages are not piped anymore...
Any idea to solve it (get the piping done and even better, not having
a terminal window opened for the external process) ?
TIA
_________________________________________________________
Gautier's Ada programming -- http://sf.net/users/gdemont/
NB: For a direct answer, e-mail address on the Web site!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: GNAT.Expect on Windows, without terminal window
2010-02-08 21:46 GNAT.Expect on Windows, without terminal window Gautier write-only
@ 2010-02-14 13:38 ` Gautier write-only
0 siblings, 0 replies; 2+ messages in thread
From: Gautier write-only @ 2010-02-14 13:38 UTC (permalink / raw)
Finally, I went on with a specific MS Windows solution.
The usage is as simple as:
--
with Ada.Text_IO;
procedure Output_a_line(l: String) is
begin
Ada.Text_IO.Put_Line('[' & l & ']');
end;
--
with Output_a_line, Windows_pipes;
procedure Win_Pipe_test is
use Windows_pipes;
p: Piped_process;
begin
Start(p, "cmd.exe /c dir", ".", Output_a_line'Access);
while Alive(p) loop
Check_progress(p);
end loop;
end Win_Pipe_test;
The code is there...
http://gnavi.svn.sourceforge.net/viewvc/gnavi/gwenerator/src/Windows_pipes.ads?view=markup&pathrev=87
______________________________________________________________
Gautier's Ada programming -- http://gautiersblog.blogspot.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-14 13:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-08 21:46 GNAT.Expect on Windows, without terminal window Gautier write-only
2010-02-14 13:38 ` Gautier write-only
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox