From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b2077f5b728fb9af X-Google-Attributes: gid103376,public X-Google-Thread: 114c38,b2077f5b728fb9af X-Google-Attributes: gid114c38,public X-Google-ArrivalTime: 2001-04-11 02:52:02 PST Path: supernews.google.com!sn-xit-03!supernews.com!news!news.he.net!feed2.onemain.com!feed1.onemain.com!newsfeed.icl.net!dispose.news.demon.net!demon!diablo.theplanet.net!btnet-peer!btnet!ftel.ftel.co.uk!not-for-mail From: Graham Baxter Newsgroups: comp.lang.ada,comp.os.vxworks Subject: Re: redirecting the standard output Date: Wed, 11 Apr 2001 10:48:17 +0100 Organization: Graham Baxter (Software) Limited Message-ID: <3AD42861.A6C58874@NOSPAM.bcs.org.uk> References: <3ad31759$1@pull.gecm.com> NNTP-Posting-Host: grahamb-pc.dsl.ftel.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en,en-US,nl,nl-BE Xref: supernews.google.com comp.lang.ada:6742 comp.os.vxworks:6403 Date: 2001-04-11T10:48:17+01:00 List-Id: Martin Dowie wrote: > > This time with a subject... :-) > > Target System: PowerPC, AdaMULTI v1.8.9b, VxWorks 5.4 > > How do I redirect the standard output? I'd like to redirect it to device > "/null" > > Attempts: > Open (DevNull, Append_File, "/null"); > Open (DevNull, "/null", "/null"); > > just cause Status_Error, i.e. the device is already "open". So how can > I then "Set_Output (DevNull);" without having the device object in > File_Type form?.. -- Try: int fd = open("/null",O_RDWR,0); if(fd != ERROR) { ioGlobalStdSet(STD_IN,fd); ioGlobalStdSet(STD_OUT,fd); ioGlobalStdSet(STD_ERR,fd); } Regards, Graham Baxter Freelance Software Engineer gbaxter@NOSPAM.bcs.org.uk