a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 dos.library
  AbortPkt
  AddBuffers
  AddDosEntry
  AddPart
  AddSegment
  AllocDosObject
  AssignAdd
  AssignLate
  AssignLock
  AssignPath
  AttemptLockDosList
  ChangeMode
  CheckSignal
  Cli
  CliInitNewcli
  CliInitRun
  Close
  CompareDates
  CreateDir
  CreateNewProc
  CreateProc
  CurrentDir
  DateStamp
  DateToStr
  Delay
  DeleteFile
  DeleteVar
  DeviceProc
  DoPkt
  DupLock
  DupLockFromFH
  EndNotify
  ErrorReport
  ExAll
  ExAllEnd
  ExNext
  Examine
  ExamineFH
  Execute
  Exit
  FGetC
  FGets
  FPutC
  FPuts
  FRead
  FWrite
  Fault
  FilePart
  FindArg
  FindCliProc
  FindDosEntry
  FindSegment
  FindVar
  Flush
  Format
  FreeArgs
  FreeDeviceProc
  FreeDosEntry
  FreeDosObject
  GetArgStr
  GetConsoleTask
  GetCurrentDirName
  GetDeviceProc
  GetFileSysTask
  GetProgramDir
  GetProgramName
  GetPrompt
  GetVar
  Info
  Inhibit
  Input
  InternalLoadSeg
  InternalUnLoadSeg
  IoErr
  IsFileSystem
  IsInteractive
  LoadSeg
  Lock
  LockDosList
  LockRecord
  LockRecords
  MakeDosEntry
  MakeLink
  MatchEnd
  MatchFirst
  MatchNext
  MatchPattern
  MatchPatternNoCase
  MaxCli
  NameFromFH
  NameFromLock
  NewLoadSeg
  NextDosEntry
  Open
  OpenFromLock
  Output
  ParentDir
  ParentOfFH
  ParsePattern
  ParsePatternNoCase
  PathPart
  PrintFault
  PutStr
  Read
  ReadArgs
  ReadItem
  ReadLink
  Relabel
  RemAssignList
  RemDosEntry
  RemSegment
  Rename
  ReplyPkt
  RunCommand
  SameDevice
  SameLock
  Seek
  SelectInput
  SelectOutput
  SendPkt
  SetArgStr
  SetComment
  SetConsoleTask
  SetCurrentDirName
  SetFileDate
  SetFileSize
  SetFileSysTask
  SetIoErr
  SetMode
  SetOwner
  SetProgramDir
  SetProgramName
  SetPrompt
  SetProtection
  SetVBuf
  SetVar
  SplitName
  StartNotify
  StrToDate
  StrToLong
  SystemTagList
  UnGetC
  UnLoadSeg
  UnLock
  UnLockDosList
  UnLockRecord
  UnLockRecords
  VFPrintf
  VFWritef
  VPrintf
  WaitForChar
  WaitPkt
  Write
  WriteChars
Include
GuruMeditation
Docs » Autodocs » dos.library » CreateProc

NAME

	CreateProc -- Create a new process

SYNOPSIS

	process = CreateProc( name, pri, seglist, stackSize )
D0 D1 D2 D3 D4
struct MsgPort *CreateProc(STRPTR, LONG, BPTR, LONG)

FUNCTION

	CreateProc() creates a new AmigaDOS process of name 'name'.  AmigaDOS
processes are a superset of exec tasks.
A seglist, as returned by LoadSeg(), is passed as 'seglist'.
This represents a section of code which is to be run as a new
process. The code is entered at the first hunk in the segment list,
which should contain suitable initialization code or a jump to
such. A process control structure is allocated from memory and
initialized. If you wish to fake a seglist (that will never
have DOS UnLoadSeg() called on it), use this code:
DS.L 0 ;Align to longword
DC.L 16 ;Segment "length" (faked)
DC.L 0 ;Pointer to next segment
...start of code...
The size of the root stack upon activation is passed as
'stackSize'. 'pri' specifies the required priority of the new
process. The result will be the process msgport address of the new
process, or zero if the routine failed. The argument 'name'
specifies the new process name. A zero return code indicates
error.
The seglist passed to CreateProc() is not freed when it exits; it
is up to the parent process to free it, or for the code to unload
itself.
Under V36 and later, you probably should use CreateNewProc() instead.

INPUTS

	name      - pointer to a null-terminated string
pri - signed long (range -128 to +127)
seglist - BCPL pointer to a seglist
stackSize - integer (must be a multiple of 4 bytes)

RESULT

	process   - pointer to new process msgport

SEE ALSO

CreateNewProc(), LoadSeg(), UnLoadSeg()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Future Crew

SCX
FC
ANA
SNT

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se