🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Creación ràpida i sencilla de logs( orientación e ideas)

#6767
From: CountZero
Date: Sat, 10 May 2003 15:47
21 lines
1826 bytes
Eso que el d�a Sat, 10 May 2003 13:58:55 +0200 iba Juli�n Albo y dijo:

> O m�s seguro y sencillo, usar dup2.

Bien, he dado un buen repaso al GULP de Sven Goldt y ciertamente mejor
usar dup2 por lo que pueda passar. Por cierto todos los ejemplos s�n con
procesos hijos (forks y tal) yo no uso (ni quiero crear) m�s de un proceso.

A ver si lo he entendido bien. Supongamos que quiero que todo lo enviado
al fd 2 (STDERR) vaya directo al archivo abierto para escritura indicado
por el descriptor fd_archivo_log.

fd=dup2(2,fd_archivo_log);

Bien, ahora fd qu� �s ? Quiero decir: �s un nuevo fd, per� me sirve para
algo ?, supongo que a�n podr� escrivir sobre fd 2 (STDERR) y
fd_archivo_log.

Gracias
Salut
Count
Technical Details
Message-ID: <pan.2003.05.10.15.47.07.970378@l3jane.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!171.red-80-36-170.pooles.rima-tde.NET!not-for-mail
References: <pan.2003.05.10.09.57.08.27496@l3jane.net> <jnoi9b.sb.ln@teleline.es> <3EBCE97F.41EF1E2D@terra.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,7601551dd0bddf69
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-05-10 08:47:10 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!171.red-80-36-170.pooles.rima-tde.NET!not-for-mail
From: "CountZero" <mark@l3jane.net>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Creación ràpida i sencilla de logs( orientación e ideas)
Date: Sat, 10 May 2003 17:47:08 +0200
Organization: l3jane.net
Lines: 22
Message-ID: <pan.2003.05.10.15.47.07.970378@l3jane.net>
References: <pan.2003.05.10.09.57.08.27496@l3jane.net> <jnoi9b.sb.ln@teleline.es> <3EBCE97F.41EF1E2D@terra.es>
NNTP-Posting-Host: 171.red-80-36-170.pooles.rima-tde.net (80.36.170.171)
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 1052581628 20888618 80.36.170.171 (16 [131244])
User-Agent: Pan/0.13.3 (That cat's something I can't explain)