Search completed in 1.24 seconds.
6 results for "pr_createprocess":
Anonymous Shared Memory
Mozilla › Projects › NSPR › Reference › Anonymous Shared Memory
ed memory terminate, the backing file is deleted. ... If you are not paranoid, you're not paying attention. The file-mapped shared memory requires a protocol for the parent process and child process to share the memory. NSPR provides two protocols. Use one or the other; don't mix and match. In the first protocol, the job of passing the inheritable shared memory is done via helper-functions with PR_CreateProcess. In the second protocol, the parent process is responsible for creating the child process; the parent and child are mutually responsible for passing a FileMap string. NSPR provides helper functions for extracting data from the PRFileMap object. ... See the examples below. Both sides should adhere strictly to the protocol for proper operation. The pseudo-code below shows the use of a file-mapped ...
... proper operation. The pseudo-code below shows the use of a file-mapped shared memory by a parent and child processes. In the examples, the server creates the file-mapped shared memory, the client attaches to it. First protocol Server: fm = PR_OpenAnonFileMap(dirName, size, FilemapProt); addr = PR_MemMap(fm); attr = PR_NewProcessAttr(); PR_ProcessAttrSetInheritableFileMap( attr, fm, shmname ); PR_CreateProcess(Client); PR_DestroyProcessAttr(attr); ... yadda ... PR_MemUnmap( addr ); PR_CloseFileMap(fm); Client: ... started by server via PR_CreateProcess() fm = PR_GetInheritedFileMap( shmname ); addr = PR_MemMap(fm); ... yadda ... PR_MemUnmap(addr); PR_CloseFileMap(fm); Second protocol Server: fm = PR_OpenAnonFileMap(dirName, size, FilemapProt); fmstring = PR_ExportFileMapAsString( fm ); addr = PR...
sslfnc.html
Mozilla › Projects › NSS › SSL functions › sslfnc.html
in the server cache. The values that you pass affect only the server cache, not the client cache. Initializing Multi-Processing with a Shared SSL Server Cache To start a multi-processing application, the initial parent process calls SSL_ConfigMPServerSIDCache, and then creates child processes, by one of these methods: Call fork and then exec (Unix) Call CreateProcess (Win32) Call PR_CreateProcess (both Unix and Win32) It is essential that the parent allow the child to inherit the file descriptors. WIN32's CreateProcess takes an argument that tells it whether or not to permit files to be inherited; this argument must be TRUE. When a new child that has been created by either CreateProcess or exec begins, it may have inherited file descriptors (FDs), but not the parent's memory. Theref...
...variable is a printable ASCII string, containing all the information needed to set up and use the inherited FDs. There are two ways to transfer the content of SSL_INHERITANCE from parent to child: The child inherits the parent's environment, which must include the SSL_INHERITANCE variable. For the child to inherit the parent's environment you must set a specific argument to CreateProcess or PR_CreateProcess. The parent transmits the content of SSL_INHERITANCE to the child by some other means, such as on the command line, or in another file or pipe. In either case, the child must call SSL_InheritMPServerSIDCache to complete the inheritance of the shared cache FDs/handles. SSL_ConfigMPServerSIDCache Sets up parameters for and opens the server session cache for a multi-process applicatio...
PRProcessAttr
Mozilla › Projects › NSPR › Reference › PRProcessAttr
Represents the attributes of a new process. Syntax #include <prproces.h> typedef struct PRProcessAttr PRProcessAttr; Description This opaque structure describes the attributes of a process to be created. Pass a pointer to a PRProcessAttr into PR_CreateProcess when you create a new process, specifying information such as standard input/output redirection and file descriptor inheritance. ...
PR_GetInheritedFileMap
Mozilla › Projects › NSPR › Reference › PR GetInheritedFileMap
Imports a PRFileMap previously exported by my parent process via PR_CreateProcess. Syntax #include <prshma.h> NSPR_API( PRFileMap *) PR_GetInheritedFileMap( const char *shmname ); Parameter The function has the following parameter: shmname The name provided to PR_ProcessAttrSetInheritableFileMap. Returns Pointer to PRFileMap or NULL on error. Description PR_GetInheritedFileMap retrieves a PRFileMap object exported from its parent process via PR_CreateProcess. Note: This function is not implemented. ...
PR_ProcessAttrSetInheritableFileMap
Mozilla › Projects › NSPR › Reference › PR ProcessAttrSetInheritableFileMap
Prepare filemap for export to my children processes via PR_CreateProcess. Syntax #include <prshma.h> NSPR_API(PRStatus) PR_ProcessAttrSetInheritableFileMap( PRProcessAttr *attr, PRFileMap *fm, const char *shmname ); Parameters The function has the following parameters: attr Pointer to a PRProcessAttr structure used to pass data to PR_CreateProcess. fm Pointer to a PRFileMap structure to be passed to the child process. shmname Pointer to the name for the PRFileMap; used by child. Returns PRStatus Description PR_ProcessAttrSetInheritableFileMap connects the PRFileMap to PRProcessAttr with shmname. A subsequent call to PR_CreateProcess makes the PRFileMap importable by the child process. Note: This function is not implemented. ...
Process Management and Interprocess Communication
Mozilla › Projects › NSPR › Reference › Process Management and Interprocess Communication
Managing Processes Setting the Attributes of a New Process The functions that create and manipulate attribute sets of new processes are: PR_NewProcessAttr PR_ResetProcessAttr PR_DestroyProcessAttr PR_ProcessAttrSetStdioRedirect PR_ProcessAttrSetCurrentDirectory PR_ProcessAttrSetInheritableFD Creating and Managing Processes The functions that create and manage processes are: PR_CreateProcess PR_DetachProcess PR_WaitProcess PR_KillProcess ...