[comp.sys.amiga.tech] pr_ConsoleTask

wpl@creation.UUCP (William Loftus) (12/04/88)

There was a very interesting discussion about Execute(), however the
best solution was Aztec specific, and I have lent my manuals to a
friend.  Can anyone tell me the Lattice 5.0 way of doing the following:

		extern APTR DeviceProc();
		proc->pr_ConsoleTask = DeviceProc("null:");

At least I think this is Aztec specific?  pr_ConsoleTask isn't defined in
any header file I have (which is the lattice 5.0 set).

Thanks,
wpl

--
William P Loftus       wpl@creation.UUCP     (215) 265 6833

dillon@CLOUD9.BERKELEY.EDU (Matt Dillon) (12/10/88)

:There was a very interesting discussion about Execute(), however the
:best solution was Aztec specific, and I have lent my manuals to a
:friend.  Can anyone tell me the Lattice 5.0 way of doing the following:
:
:		extern APTR DeviceProc();
:		proc->pr_ConsoleTask = DeviceProc("null:");
:
:At least I think this is Aztec specific?  pr_ConsoleTask isn't defined in
:any header file I have (which is the lattice 5.0 set).
:
:Thanks,
:wpl
:
:--
:William P Loftus       wpl@creation.UUCP     (215) 265 6833

	What you have above ought to work no matter which compiler
you use.  This will fix problems with things you Execute().  In Aztec C,
you must also fclose(stderr) because that references "*" (otherwise
you will not be able to close the console window).  I do not know what
Lattice does but there's a good chance fclose(stderr) will also work.

	     .		o
      .	    
     	  			    o
 . 
//					  O

					-Matt\|/
					      *

nordmark@nada.kth.se (Arne Nordmark) (12/11/88)

In article <0000.AA0000@creation> wpl@creation.UUCP (William Loftus) writes:
>There was a very interesting discussion about Execute(), however the
>best solution was Aztec specific, and I have lent my manuals to a
>friend.  Can anyone tell me the Lattice 5.0 way of doing the following:
>
>		extern APTR DeviceProc();
>		proc->pr_ConsoleTask = DeviceProc("null:");
>
>At least I think this is Aztec specific?  pr_ConsoleTask isn't defined in
>any header file I have (which is the lattice 5.0 set).

Please take a closer look at struct Process in <libraries/dosextens.h>...

I did in fact post a simple test-program (DevRun.c) here in .tech recently.
It shows how to set up your c-program to run without a console-window
and it compiles with *both* Lattice and Aztec, believe me.
You will also need my null: device from comp.sources.amiga.

Anybody else who missed DevRun.c? I'll email the code to anyone who
is interested.

  -- Gunnar

SNAIL: Gunnar Nordmark          VOICE: (+46) 8 - 755 42 52
       Nora strand 5
       S-182 34 DANDERYD        EMAIL: gno@stacken.kth.se
       SWEDEN                          gno@SESTAK.BITNET

"Words, words, words."  William Shakespeare