Article View: es.comp.os.linux.programacion
Article #13583Re: Señales (signal.h) en C
From: Cesar
Date: Fri, 09 Feb 2001 07:51
Date: Fri, 09 Feb 2001 07:51
55 lines
2996 bytes
2996 bytes
Seldon wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > El 6 Feb 2001 21:31:45 GMT, J.A. Gutierrez no ten�a nada mejor que hacer, > y dijo en es.comp.os.linux.programacion: > > > Una variable global de status que se pone a cierto valor > > en la rutina de servicio de la se~nal. > > El bucle principal del programa ve que ha cambiado y > > sale por donde le toque. > > > > Otra: man setjmp/longjmp > > Gracias, pero creo que lo dejar� tal y como est�, porque el programa > entra en un bucle casi infinito, que es detenido al llegar la interrupci�n, > que puede llegar en cualquier momento. Por tanto, si tengo que hacer un > setjmp o comprobar si la variable de status ha cambiado en cada 'vuelta' del > bucle es aumentar (creo que) innecesariamente el tiempo de ejecuci�n. Por que no utilizas select ? Esto no lo he probado pero podr�as hacer que el manejador de se�ales mandara algo a stderr por ejemplo.De esta forma poniendo a select esperando por stderr,te evitar�as el bucle infinito y el pooling. Es una idea. Un saludo. C�sar. > De todas formas, tendr� en cuenta las sugerencias para futuros > programas ;) Gracias de nuevo. > > Slds > > - -- > Seldon (seldon@seldon.4mg.com) - Linux user: 164.255 > ================================================= > PGP Key: http://pgp5.ai.mit.edu:11371/pks/lookup?op=get&search=0x64794AF8 > Fingerprint: DA8F 06A0 B770 4211 A6E7 D1E8 8A03 BC70 6479 4AF8 > ================================================= > Administrador Lista Hackindex: > hackindex-alta@eListas.net > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.4 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > iD8DBQE6gfQOigO8cGR5SvgRApT3AJ0QJ7b2gSIW9TIVg0brxj76Pgd1NgCgyX0t > xdBKvtrFc72GlbtinPYZ57w= > =IJxE > -----END PGP SIGNATURE-----
Technical Details
Message-ID:
<3A83A170.57BACF68@ave128.retena.es>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!jussieu.fr!news.rediris.es!garse!localhost!not-for-mailReferences:
<6mon59.jr1.ln@gaia.seldon.4mg.com> <95pqg1$sm4$1@news.unizar.es> <l6ss59.0a.ln@gaia.seldon.4mg.com>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,c8786e5a2d117e54 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2001-02-08 22:54:25 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!jussieu.fr!news.rediris.es!garse!localhost!not-for-mail From: Cesar <ciriso@ave128.retena.es> Newsgroups: es.comp.os.linux.programacion Subject: Re: Señales (signal.h) en C Date: Fri, 09 Feb 2001 07:51:12 +0000 Organization: Retena Lines: 55 Message-ID: <3A83A170.57BACF68@ave128.retena.es> References: <6mon59.jr1.ln@gaia.seldon.4mg.com> <95pqg1$sm4$1@news.unizar.es> <l6ss59.0a.ln@gaia.seldon.4mg.com> NNTP-Posting-Host: 212.21.229.16 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: araquil.r-y-r.com 981701085 23347 212.21.229.16 (9 Feb 2001 06:44:45 GMT) X-Complaints-To: news@news.r-y-r.com NNTP-Posting-Date: 9 Feb 2001 06:44:45 GMT X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.2.17 i586) X-Accept-Language: en