Article View: es.comp.os.linux.programacion
Article #10041Re: Quiero capturar una señal...
From: Ignacio Arenaza
Date: Thu, 04 Apr 2002 21:03
Date: Thu, 04 Apr 2002 21:03
34 lines
2504 bytes
2504 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "sdds" == sdds <repiteclave2@hotmail.com> writes:
sdds> Hola, mi problema es el siguiente: Se que cuando un
sdds> proceso hijo hace exit() el kernel, envia al padre un
sdds> SIGCHLD, el cual puedo capturar o no, en mi caso si que lo
sdds> necesito capturar, el problema viene cuando el hijo ejecuta
sdds> una funcion EXEC, la cual me quita el control del hijo, el
sdds> cual ya no ejecuta el exit ni ninguna otra sentencia, que
sdds> siga al exec, alguien me recomienda algo?
Aunque un proceso no ejecute exit(3), si este termina, se genera la
se�al SIGCHLD y se le envia al proceso padre en todo caso. Es el
propio kernel quien se encarga de ello.
Asi que puedes usar wait (o un gestor de se�al) para recibir la se�al
y hacer lo que sea menester en ella.
Saludos. I�aki.
- --
Get PGP/GPG Keys at http://www.escomposlinux.org/iarenaza/pgpkey.html
I use free software / Yo uso software libre
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt and GPG
iD8DBQE8rL+HZXLnGT1HLgcRAkZcAKCS6lpbcnFJmrpwX6jONHU2RixdHACcCvJC
WgdzSTYWC7csqmnsvvNIeko=
=p1p3
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<878z83dvna.fsf@eb2ebu.ampr.org>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news-ber1.dfn.de!fu-berlin.de!uni-berlin.de!213-98-107-123.uc.nombres.ttd.ES!not-for-mailReferences:
<a8i22r$o3h$1@talia.mad.ttd.net>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,54c03a1aeb46d824 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2002-04-04 13:05:10 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news-ber1.dfn.de!fu-berlin.de!uni-berlin.de!213-98-107-123.uc.nombres.ttd.ES!not-for-mail From: Ignacio Arenaza <iarenaza@eb2ebu.ampr.org> Newsgroups: es.comp.os.linux.programacion Subject: Re: Quiero capturar una señal... Date: 04 Apr 2002 23:03:05 +0200 Organization: Servidor NNTP de eb2ebu.ampr.org Lines: 34 Sender: linuxero@62-36-162-172.dialup.uni2.es Message-ID: <878z83dvna.fsf@eb2ebu.ampr.org> References: <a8i22r$o3h$1@talia.mad.ttd.net> NNTP-Posting-Host: 213-98-107-123.uc.nombres.ttd.es (213.98.107.123) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: fu-berlin.de 1017954308 30301064 213.98.107.123 (16 [64988]) X-Orig-Path: antonio.escomposlinux.org!news.antakira.com!news.audiolis.com!217.127.183.203!eriador.escomposlinux.org!eb2ebu.ampr.org!not-for-mail User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7