Article View: es.comp.os.linux.programacion
Article #17352Re: Pasar información de un proceso hijo a un padre?
From: J.A. Gutierrez
Date: Thu, 20 Jan 2000 00:00
Date: Thu, 20 Jan 2000 00:00
28 lines
1736 bytes
1736 bytes
Gorka Olaizola <gorka@news.hondarribia.org> wrote:
: �Como puedo saber cuando ha terminado el hijo?
cuando al leer el padre se encuentra con una condicion de EOF
: �Manda este una se�al cuando ha terminado?
si, aunque tambien puedes hacerlo con un wait(), hasta que
te devuelva el PID del hijo.
la se~nal es SIGCHLD
: while ( (position=read(descf[0], buffer, MAX_BUF-1)) >0 ) {
: buffer[position]='\0';
: printw("%s", buffer);
: refresh();
: }
debe haber algun otro problema; ese bucle deberia acabar
cuando el hijo cierra la tuberia...
--
PGP and other useless info at \ Oh, show us the way
http://www.cps.unizar.es/~spd/ \ to the next whisky bar
finger://daphne.cps.unizar.es/spd \ Weill/Bretch
es doloroso ser sabio y descubrir la sopa de ajo (Pla)
Technical Details
Message-ID:
<8677np$s6t$1@news.unizar.es>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<slrn88dq8r.rv7.gorka@conan.hondarribia.org>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,af3250f298097218
X-Google-Attributes: gidf86c8,public
From: "J.A. Gutierrez" <spd@daphne.cps.unizar.es>
Subject: Re: Pasar información de un proceso hijo a un padre?
Date: 2000/01/20
Message-ID: <8677np$s6t$1@news.unizar.es>
X-Deja-AN: 575283662
Content-Transfer-Encoding: 8bit
References: <slrn88dq8r.rv7.gorka@conan.hondarribia.org>
Content-Type: text/plain; charset=ISO-8859-1
X-Complaints-To: usenet@news.unizar.es
X-Trace: news.unizar.es 948380217 28893 155.210.152.20 (20 Jan 2000 14:56:57 GMT)
Organization: Rank
Mime-Version: 1.0
User-Agent: tin/1.4.1-19991201 ("Polish") (UNIX) (IRIX/6.2 (IP22))
NNTP-Posting-Date: 20 Jan 2000 14:56:57 GMT
Newsgroups: es.comp.os.linux.programacion