🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #8533

Capturar la salida de un programa

#8533
From: Francisco
Date: Mon, 11 Nov 2002 23:12
14 lines
1488 bytes
Hola a todos.

	Estoy haciendo un peque�o programa en C que tiene que llamar a otro 
programa con la funci�n system () y necesito capturar su salida.

	La idea mas simple que se me ha ocurrido (y que seguramente funcionar�) 
es redireccionar la salida a un fichero, y despu�s leer ese fichero.

	system ("prog > /tmp/fichero");

	Existe otra forma de hacer lo mismo sin necesidad de crear el fichero?


Un saludo.
Technical Details
Message-ID: <3DD03990.1090606@ono.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!diablo.theplanet.net!newspeerenv1.svr.pol.co.uk!newsfeed.wirehub.nl!kleenex.wirehub.nl!newsf01.ono.com!news.ono.com.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,c70e8198e9aa783d,start
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-11-11 15:12:41 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!diablo.theplanet.net!newspeerenv1.svr.pol.co.uk!newsfeed.wirehub.nl!kleenex.wirehub.nl!newsf01.ono.com!news.ono.com.POSTED!not-for-mail
Message-ID: <3DD03990.1090606@ono.com>
From: Francisco <fjaime@ono.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: es-es
MIME-Version: 1.0
Newsgroups: es.comp.os.linux.programacion
Subject: Capturar la salida de un programa
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 15
Date: Mon, 11 Nov 2002 23:12:31 GMT
NNTP-Posting-Host: 62.42.131.27
X-Complaints-To: abuse@ono.com
X-Trace: news.ono.com 1037056351 62.42.131.27 (Tue, 12 Nov 2002 00:12:31 MET)
NNTP-Posting-Date: Tue, 12 Nov 2002 00:12:31 MET