🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Redireccionando stderr

#1978
From: David Lago
Date: Thu, 19 May 2005 20:47
20 lines
1646 bytes
Mat�as Costa wrote:
> int devnull=open("/dev/null");
> int old2=dup(2);
> dup2(devnull, 2);
> 
> Puede que funcione �?

S�, funciona. S�lo tuve que a�adirle como segundo par�metro a open
O_RDWR... muchas gracias!

Un saludo,
David.
-- 
#############################################
#      David Lago <dlago@mundo-r.com>       #
#     PGP key available at pgp.mit.edu      #
# ----------------------------------------- #
#          Personal Blizog at               #
#  http://www.arcanelinux.org/blog/dlworld  #
#############################################
Technical Details
Message-ID: <d6iu1a$rou2@cesio.mundo-r.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!cesio.mundo-r.com!not-for-mail
References: <d6crgc$4j53@cesio.mundo-r.com> <d6cu17$4jj4@cesio.mundo-r.com> <d6cujj$4jj7@cesio.mundo-r.com> <npPie.40815$dr.24253@news.ono.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,1e9cda547f52621
X-Google-Attributes: gidf86c8,public
X-Google-Language: ENGLISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!cesio.mundo-r.com!not-for-mail
From: David Lago <dlago@mundo-r.com>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Redireccionando stderr
Date: Thu, 19 May 2005 22:47:37 +0200
Organization: R Cable y Telecomunicaciones
Lines: 20
Message-ID: <d6iu1a$rou2@cesio.mundo-r.com>
References: <d6crgc$4j53@cesio.mundo-r.com> <d6cu17$4jj4@cesio.mundo-r.com> <d6cujj$4jj7@cesio.mundo-r.com> <npPie.40815$dr.24253@news.ono.com>
NNTP-Posting-Host: cm188095.red.mundo-r.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050515)
X-Accept-Language: en-us, en
In-Reply-To: <npPie.40815$dr.24253@news.ono.com>
X-Enigmail-Version: 0.90.0.0
X-Enigmail-Supports: pgp-inline, pgp-mime