[comp.sys.next] processes, interfaces, wraps

c6787903@scheme.cs.ubc.ca (marko ragnar riedel) (03/08/91)

Hi,

I posted a message here a couple of days ago,
inquiring about the most efficient way to wrap a NeXT interface around a
standard Unix app (source code not available). 
I have received quite a few replies from people
interested in the matter, 
but there weren't any postings with regard to my previous message.
That's why I'm posting it again. I will summarize whatever I get.

Here's the general problem:

you have a tty based program, reading from stdin and writing to stdout, stderr.
The idea is to write a NeXT app, which starts the program, scans its input/output
and acts on whatever it gets. E.g., in one specific case, it might be a scheme/lisp 
interpreter, writing messages to stdout that will be picked up and interpreted as
addressed to a graphics or sound device.

Hence, the goal is to fork, flip stdin/stdout, and exec.

Results so far:
- 1. Using code that worked fine in C, 
I wrote a class to do that sort of io manipulation with pipes.
The class compiles fine, program runs, forks and exec's ok, 
but the pipes don't seem to work anymore.
- 2. I'm working in 1.0. NeXT told me the Subprocess class from 2.0 should work. 
Nonetheless, I would rather prefer writing the thing myself, and not use 2.0 code in 1.0.

Thanks.

Marko

PS: if I get this going, it should end up being a tool
 that takes nib files and wraps interfaces around apps.
Has anyone done this sort of thing already?
If so ****WHERE**** can I ****GET THE CODE****.

****************************
funniest quote of the week:
... And we lifted the yoke of aggression and tyranny from a country
that many Americans had never even heard of, and WE ASK NOTHING
IN RETURN. ....
(George Bush, Mar. 6, capitals mine)
****************************