[Vala] read a program stdout
- From: Rodrigo Herefeld <rodrigo herefeld gmail com>
- To: Vala List <vala-list gnome org>
- Subject: [Vala] read a program stdout
- Date: Wed, 23 Nov 2011 15:08:29 -0200
Hi all!
I need to run a program and get the stdout data from it, for example, im
python i would
do:
import os
print(os.popen("gpg --version").read()
in vala i've tryed:
var ret = Posix.FILE.popen("gpg --version","r+");
string tmpret = "";
ret.scanf("%s",tmpret);
Glib.stdout.printf(tmpret);
But i'm getting a seg fault
--
Rodrigo Cesar Herefeld
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]