C (48/207)

From:Ben Hutchings
Date:06 Dec 99 at 01:50:20
Subject:Re: Process/Task confusion

From: Ben Hutchings <womble@zzumbouk.demon.co.uk>

On Sun, Dec 05, 1999 at 11:45:52PM +0000, Martyn Capewell wrote:
> From: Martyn Capewell <mmc28@hermes.cam.ac.uk>
>
> Hello,
>
> I'm confused about the capabilities of tasks and processes. For example, is
> it true I can't use dos library functions, or anything that may invoke one
> of those functions from a task?

A process is just a task with some extra state information used by DOS
(such as current directory). All dos.library functions require this
extra state unless their documentation states otherwise.

> If I start a program from Workbench (rather than a shell), is it running as
> a task or a process? And if it is running as a task, how do I use dos
> functions from it?

It's running as a process.

> Finally, what does AllocDosObject() do? The autodocs don't seem to help.

It allocates and initialises one of several kinds of structures used
by DOS. (So it's sort of like a `new' operator for those structures.)

Ben.



Ben Hutchings - womble@zzumbouk.demon.co.uk, http://www.zzumbouk.demon.co.uk
Team *AMIGA* | Jay Miner Society | Linux - the choice of a GNU generation
Experience is directly proportional to the value of equipment destroyed.
- Carolyn Scheppner