process_management_and_interprocess_communication.rst (1944B)
1 Process Management And Interprocess Communication 2 ================================================= 3 4 This chapter describes the NSPR routines that deal with processes. A 5 process is an instance of a program. NSPR provides routines to create a 6 new process and to wait for the termination of another process. 7 8 NSPR does not provide an equivalent of the Unix ``fork()``. The 9 newly-created process executes its program from the beginning. A new 10 process can inherit specified file descriptors from its parent, and the 11 parent can redirect the standard I/O streams of the child process to 12 specified file descriptors. 13 14 Note that the functions described in this chapter are not available for 15 MacOS or Win16 operating systems. 16 17 .. _Process_Management_Types_and_Constants: 18 19 Process Management Types and Constants 20 -------------------------------------- 21 22 The types defined for process management are: 23 24 - :ref:`PRProcess` 25 - :ref:`PRProcessAttr` 26 27 .. _Process_Management_Functions: 28 29 Process Management Functions 30 ---------------------------- 31 32 The process manipulation function fall into these categories: 33 34 - `Setting the Attributes of a New 35 Process <#Setting_the_Attributes_of_a_New_Process>`__ 36 - `Creating and Managing 37 Processes <#Creating_and_Managing_Processes>`__ 38 39 .. _Setting_the_Attributes_of_a_New_Process: 40 41 Setting the Attributes of a New Process 42 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 43 44 The functions that create and manipulate attribute sets of new processes 45 are: 46 47 - :ref:`PR_NewProcessAttr` 48 - :ref:`PR_ResetProcessAttr` 49 - :ref:`PR_DestroyProcessAttr` 50 - :ref:`PR_ProcessAttrSetStdioRedirect` 51 - :ref:`PR_ProcessAttrSetCurrentDirectory` 52 - :ref:`PR_ProcessAttrSetInheritableFD` 53 54 .. _Creating_and_Managing_Processes: 55 56 Creating and Managing Processes 57 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 58 59 The functions that create and manage processes are: 60 61 - :ref:`PR_CreateProcess` 62 - :ref:`PR_DetachProcess` 63 - :ref:`PR_WaitProcess` 64 - :ref:`PR_KillProcess`