[Vala] Getting programs output
- From: Arkadi Viner <arkashkin gmail com>
- To: vala-list gnome org
- Subject: [Vala] Getting programs output
- Date: Wed, 29 Jul 2009 13:31:17 +0300
Hello.
I am really new to VALA and my Linux programing experience is very small.
I am writing some code to execute a program from my program, and i want to know how can I upgrade my code so it will update
some textbox on a real-time with the executed program's std_output..
I use this function to execute the another program:
public static void execProgram()
{
string[] argv = new string[1];
argv[0] = "/home/arkadi/tt";
//argv[1] = null;
Pid child_pid;
int input_fd;
int output_fd;
int error_fd;
try {
Process.spawn_async_with_pipes(
command_line,
argv, //argv
null, // environment
SpawnFlags.SEARCH_PATH,
null, // child_setup
out child_pid,
out input_fd,
out output_fd,
out error_fd);
}
catch (Error e) {
stderr.printf ("Could not load UI: %s\n", e.message);
}
}
So I need a little bit help :-)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]