[Coco] Fwd: Re: Redirection.

coco at jechar.ca coco at jechar.ca
Fri Apr 3 16:11:44 EDT 2020


I wrote another program, test program that outputs "hello" and
an receiving program that outputs "hello hello" by taking the output
from the first program and printing it then a adding a space and
then outputting what was revived again.

Works fine and always works.

But my original program is strange it always fails the first time
it is run but succeeds on subsequent runs. Until you reboot then
it fails again the first time you run it.

Very odd behaviour.

Do you have any Idea what kind of coding error could produce such
behaviour.

Charlie


-------- Original Message --------
Subject: Re: [Coco] Redirection.
Date: 2020-04-02 12:41
 From: tim lindner <tlindner at macmess.org>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Reply-To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>

On Thu, Apr 2, 2020 at 9:25 AM <coco at jechar.ca> wrote:
>   1.   How to design test1.b09 so that you could redirect
>      another os9 program such as dir to act as it's input.
> 
>   2.   Does anything special have to be done so that a program
>      test2.b09 can redirect it's output to act as the input for
>      test1.b09 at the command line.
> 

You write your programs to accept input from STDIN and output to STDOUT.

The shell is responsible for setting up the pipes.


-- 
--
tim lindner

"Proper User Policy apparently means Simon Says."


More information about the Coco mailing list