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: 114c38,b2077f5b728fb9af X-Google-Attributes: gid114c38,public X-Google-Thread: 103376,b2077f5b728fb9af X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-10 21:49:11 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!204.94.211.44!enews.sgi.com!coop.net!newsfeed1.global.lmco.com!svlnews.lmms.lmco.com!not-for-mail From: "Smark" Newsgroups: comp.lang.ada,comp.os.vxworks Subject: Re: redirecting the standard output Date: Tue, 10 Apr 2001 11:46:16 -0500 Organization: Lockheed Martin Corporation Message-ID: <9avdcq$s6j1@cui1.lmms.lmco.com> References: <3ad31759$1@pull.gecm.com> NNTP-Posting-Host: 138.209.253.101 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Xref: supernews.google.com comp.lang.ada:6737 comp.os.vxworks:6399 Date: 2001-04-10T11:46:16-05:00 List-Id: "Martin Dowie" wrote in message news:3ad31759$1@pull.gecm.com... > 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?.. > > I have also had problems redirecting Ada.Text_Io on the same platform. When I use the applicable VxWorks calls, ioGlobalStdSet or ioTaskStdSet, my printf's from C programs are redirected, but Ada.Text_Io seems to be unaffected. In my case, I'm trying to redirect IO to an open socket. The solution I'm toying with is making an Ada interface to printf. Is there a better way to get Ada IO to respond to calls to the above VxWorks functions? One thing you might try, Martin, is to re-direct to "/null/0". Cheers, Mark