Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File5.12.4 Pfork TOS Name: »Pfork« - Create a copy of the current process. Opcode: 283 Syntax: int16_t Pfork ( void ); Description: The function Pfork creates a copy of the current process. The child process inherits a copy of the address space of the parent process, i.e. changes made to variables by the child have no effect on the parent. The newly created process starts its work when the function Pfork returns. If the parent is in supervisor-mode when this call is made, the child is launched in user-mode anyway. New processes launched with this call should not use Mshrink, but are required to do any GEM initialisation such as appl_init and v_openvwk again (if they need to use GEM). Both parent and child use Pterm or Pterm0 to terminate themselves. Return value: The function can return the following results: E_OK : In child process >0 : New process ID in parent process ENSMEM: Not enough memory available to create the new process Availability: As of the first in MultiTOS integrated MiNT version 1.04. Group: Process functions See also: Binding Pexec Pvfork Threads