From: Graham Baxter <gbaxter@NOSPAM.bcs.org.uk>
Subject: Re: redirecting the standard output
Date: Wed, 11 Apr 2001 10:48:17 +0100
Date: 2001-04-11T10:48:17+01:00 [thread overview]
Message-ID: <3AD42861.A6C58874@NOSPAM.bcs.org.uk> (raw)
In-Reply-To: 3ad31759$1@pull.gecm.com
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
next prev parent reply other threads:[~2001-04-11 9:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-10 14:32 redirecting the standard output Martin Dowie
2001-04-10 15:01 ` redirecting the standard output to different std outputs? Frank
2001-04-10 16:17 ` Mark Biggar
2001-04-10 20:38 ` James Rogers
2001-04-13 16:23 ` Tucker Taft
2001-04-10 16:08 ` redirecting the standard output Stephen Leake
2001-04-10 16:46 ` Stephen Leake
2001-04-10 17:13 ` Smark
2001-04-10 21:00 ` Ted Dennison
2001-04-11 7:32 ` Martin Dowie
2001-04-11 12:04 ` Stephen Leake
2001-04-11 14:15 ` Martin Dowie
2001-04-12 1:41 ` tmoran
2001-04-12 7:08 ` Martin Dowie
2001-04-10 16:46 ` Smark
2001-04-11 12:06 ` Stephen Leake
2001-04-11 14:11 ` Martin Dowie
2001-04-11 0:04 ` Jeff Creem
2001-04-11 9:48 ` Graham Baxter [this message]
2001-04-12 12:23 ` Martin Dowie
2001-04-12 14:01 ` Smark
2001-04-12 19:52 ` martin.m.dowie
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox