The length of the termination message is equated to the constant ACC$K_TERMLEN.
OpenVMS usage: | mask_longword |
type: | longword (unsigned) |
access: | read only |
mechanism: | by value |
Each option (bit) has a symbolic name, which the $PRCDEF macro defines. You construct the stsflg argument by performing a logical OR operation using the symbolic names of each desired option. The following table describes the symbolic name of each option.
Symbolic Name | Description |
---|---|
PRC$M_BATCH | Create a batch process. DETACH privilege is required. |
PRC$M_DETACH | Create a detached process. |
PRC$M_DISAWS | Disable system-initiated working set adjustment. |
PRC$M_HIBER | Force process to hibernate before it executes the image. |
PRC$M_IMGDMP | Enable image dump facility. If an image terminates due to an unhandled condition, the image dump facility writes the contents of the address space to a file in your current default directory. The file name is the same as the name of the terminated image. The file type is .DMP. |
PRC$M_INTER | Create an interactive process. This option is meaningful only if the image argument specifies SYS$SYSTEM:LOGINOUT.EXE. The purpose of this option is to provide you with information about the process. When you specify this option, it identifies the process as one that is in communication with another user (an interactive process). For example, if you use the DCL lexical function F$MODE to make an inquiry about a process that has specified the PRC$M_INTER option, F$MODE returns the value INTERACTIVE. |
PRC$M_NETWRK | Create a process that is a network connect object. DETACH privilege required. |
PRC$M_NOACNT | Do not perform accounting. ACNT privilege is required. |
PRC$M_NOPASSWORD | Do not display the Username: and Password: prompts if the process is interactive and detached and the image is SYS$SYSTEM:LOGINOUT.EXE. If you specify this option in your call to $CREPRC, the process created by the call is logged in under the user name associated with the creating process. If you do not specify this option for an interactive process, SYS$SYSTEM:LOGINOUT.EXE prompts you for the user name and password to be associated with the process. The prompts are displayed at the SYS$INPUT device. |
PRC$M_NOUAF |
Do not check authorization file if the process is detached and the
image is SYS$SYSTEM:LOGINOUT.EXE. You should not specify this option if
a subprocess is being created.
In previous versions of the operating system, the symbolic name of this option was PRC$M_LOGIN. The symbolic name has been changed to more accurately denote the effect of setting this bit. For compatibility with existing user programs, you can still specify this bit as PRC$M_LOGIN. |
PRC$M_PSWAPM | Inhibit process swapping. PSWAPM privilege is required. |
PRC$M_SSFEXCU | Enable system service failure exception mode. |
PRC$M_SSRWAIT | Disable resource wait mode. |
PRC$M_SUBSYSTEM | Inherit any protected subsystem identifiers. The default is that the new process does not inherit subsystem identifiers. |
PRC$M_TCB | Mark a process as part of the trusted computing base (TCB). As such, it is expected to perform its own auditing. DETACH privilege is required. |
Note that options PRC$M_BATCH, PRC$M_INTER, PRC$M_NOUAF, PRC$M_NETWRK, and PRC$M_NOPASSWORD are intended for use by Digital software.
OpenVMS usage: | reserved |
type: | longword (unsigned) |
access: | |
mechanism: | 0 |
OpenVMS usage: | SCS_nodename |
type: | character-coded text string |
access: | read only |
mechanism: | by descriptor--fixed-length string descriptor |
The Create Process service creates a subprocess or detached process on behalf of the calling process. A subprocess can be created only on the current OpenVMS Cluster node. A detached process can be created on the current OpenVMS Cluster node or on the node specified with the node argument.A detached process is a fully independent process. For example, the process that the system creates when you log in is a detached process. A subprocess, on the other hand, is related to its creating process in a treelike structure; it receives a portion of the creating process's resource quotas and must terminate before the creating process. Any subprocesses that still exist when their creator is being deleted are automatically deleted.
The presence of the uic argument, node argument, or the PRC$M_DETACH flag specifies that the created process is detached.
Creating a process is synchronous in that the process has actually been created and its PID determined before control returns to the program that requested the system service. Note, however, that the new process has not necessarily begun to execute at that point. Some error conditions are not detected until the created process executes. These conditions include an invalid or nonexistent image; invalid SYS$INPUT, SYS$OUTPUT, or SYS$ERROR logical name equivalence; inadequate quotas; or insufficient privilege to execute the requested image.
In creating a detached or subprocess, you can specify that the process run the image SYS$SYSTEM:LOGINOUT.EXE. During interactive logins, LOGINOUT performs the following functions:
- It validates user name and password.
- It reads the system authorization file record associated with that user and redefines the process environment based on information from the record.
- It maps a command language interpreter (CLI) into the process and passes control to it.
The CLI reads a command from SYS$INPUT, processes it, and reads another command. The presence of the CLI enables the process to execute multiple images. It also enables an image running in the process to use Run-Time Library procedures, such as LIB$SPAWN, LIB$DO_COMMAND, and LIB$SET_LOGICAL, that require a CLI.
Running in the context of a process you create through $CREPRC, LOGINOUT can perform some or all of the preceding steps, depending on whether the process is a subprocess or a detached process and on the values of PRC$M_NOPASSWORD and PRC$M_NOUAF in the stsflg argument.
Certain characteristics of a created process can be specified explicitly through $CREPRC system service arguments, while other characteristics are propagated implicitly from the $CREPRC caller. Implicit characteristics include the following:
Note, however, that after the process has been created, if it runs LOGINOUT and LOGINOUT redefines the process environment, those characteristics will be overridden by information from the system authorization file.
- Current default directory
- Creator's equivalence name for SYS$DISK
- User and account names
- Command language interpreter (CLI) name and command table file name
Several process characteristics are relevant to the creation of a process on another OpenVMS Cluster node, in particular, process quotas, default directory, SYS$DISK equivalence name, CLI name, and CLI command table name.
Quotas for a process created on another OpenVMS Cluster node are calculated as previously described in the section on the use of the quota list; namely, they are based on explicit values passed by the creator and SYSGEN parameters on the other OpenVMS Cluster node. If the other node has its own authorization file with node-specific quotas, you might want to specify in the $CREPRC request that the process run LOGINOUT so it can redefine the process environment based on that node's quotas for the user.
Unless overridden by LOGINOUT, the new process will use its creator's default disk and directory. If the disk is not mounted clusterwide, the created process might need to redefine SYS$DISK with an equivalence name that specifies a disk accessible from that node.
When you set the PRC$M_NOUAF flag in the stsflg argument and create a process running LOGINOUT, LOGINOUT will attempt to map a CLI and command table with the same file names as those running in your process. The CLI and command table images must therefore have already been installed by the system manager on the other node. Problems can arise when you are using something other than the DCL CLI and its standard command tables. For example, if you are running on a VAX node with MCR as your current CLI, LOGINOUT will be unable to map that CLI on an Alpha node. The new process will be created but then aborted by LOGINOUT.
A detached process is considered an interactive process only if (1) the process is created with the PRC$M_INTER option specified and (2) SYS$INPUT is not defined as a file-oriented device.
The $CREPRC service requires system dynamic memory.
Required Access or Privileges
The calling process must have the following:
- DETACH or CMKRNL privilege to create any of the following types of process:
- A detached process with a UIC that is different from the UIC of the calling process
- A detached process with a larger value specified for some quota than is authorized for the caller
- A detached process on another node if the SYSGEN parameter CWCREPRC_ENABLE has a value of 0
- DETACH privilege to create any of the following types of process:
- A batch process
- A network process
- A trusted computing base process
- ALTPRI privilege to create a subprocess with a higher base priority than the calling process
- SETPRV privilege to create a process with privileges that the calling process does not have
- PSWAPM privilege to create a process with process swap mode disabled
- ACNT privilege to create a process with accounting functions disabled
- OPER privilege to create a detached process on another OpenVMS Cluster node on which interactive logins have not yet been enabled
Required Quota
The number of subprocesses that a process can create is controlled by the subprocess (PRCLM) quota; this quota is returned when a subprocess is deleted.
The number of detached processes on any one OpenVMS Cluster node that a process can create with the same user name is controlled by the MAXDETACH entry in the user authorization file (UAF).
When a subprocess is created, the value of any deductible quota is subtracted from the total value the creating process has available, and when the subprocess is deleted, the unused portion of any deductible quota is added back to the total available to the creating process. Any pooled quota value is shared by the creating process and all its subprocesses.
Related Services
$CANEXH, $DCLEXH, $DELPRC, $EXIT, $FORCEX, $GETJPI, $GETJPIW, $HIBER, $PROCESS_SCAN, $RESUME, $SETPRI, $SETPRN, $SETPRV, $SETRWM, $SUSPND, $WAKE
SS$_ACCVIO The caller cannot read a specified input string or string descriptor, the privilege list, or the quota list; or the caller cannot write the process identification. SS$_DUPLNAM The specified process name duplicates one already specified within that group. SS$_EXPRCLM The creation of a detached process failed because the creating process already reached its limit for the creation of detached processes. This limit is established by the MAXDETACH quota in the user authorization file (UAF) of the creating process. SS$_EXQUOTA At least one of the following conditions is true:
- The process has exceeded its quota for the creation of subprocesses.
- A quota value specified for the creation of a subprocess exceeds the creating process's corresponding quota.
- The quota is deductible and the remaining quota for the creating process would be less than the minimum.
SS$_INCOMPAT The remote node is running an incompatible version of the operating system, namely, one that does not support remote process creation. SS$_INSFMEM The system dynamic memory is insufficient for the requested operation. SS$_INVARG An invalid argument was specified. SS$_IVLOGNAM At least one of the following two conditions is true:
- The specified process name has a length of 0 or has more than 15 characters.
- The specified image name, input name, output name, or error name has more than 255 characters.
SS$_IVQUOTAL The quota list is not in the proper format. SS$_IVSTSFLG A reserved status flag was specified. SS$_NODELEAVE The specified node was removed from the OpenVMS Cluster during the $CREPRC service's execution. SS$_NOPRIV The caller violated one of the privilege restrictions. SS$_NORMAL The service completed successfully. SS$_NOSLOT No process control block is available; in other words, the maximum number of processes that can exist concurrently in the system has been reached. SS$_NOSUCHNODE The specified node is not currently a member of the cluster. SS$_REMRSRC The remote node has insufficient resources to respond to the request. (Bring this error to the attention of your system manager.) SS$_UNREACHABLE The remote node is a member of the cluster but is not accepting requests. This is normal for a brief period early in the system boot process.
Adds a range of demand-zero allocation pages (on VAX systems) or pagelets (on Alpha systems) to a process's virtual address space for the execution of the current image.
SYS$CRETVA inadr ,[retadr] ,[acmode]
int sys$cretva (struct _va_range *inadr, struct _va_range *retadr, unsigned int acmode);
inadr
OpenVMS usage: address_range type: longword (unsigned) access: read only mechanism: by reference
Address of a 2-longword array containing the starting and ending virtual addresses of the pages to be created. If the starting and ending virtual addresses are the same, a single page is created. The addresses are adjusted up or down to fall on CPU-specific page boundaries. Only the virtual page number portion of the virtual address is used; the low order byte-within-page bits are ignored.retadr
OpenVMS usage: address_range type: longword (unsigned) access: write only mechanism: by reference--array reference or descriptor
Address of a 2-longword array to receive the starting and ending virtual addresses of the pages created.On Alpha systems, the retadr argument should be checked by programs for actual allocation. Because the Alpha architecture defines more than one page size, more space might be created than was specified in the retadr argument.
acmode
OpenVMS usage: access_mode type: longword (unsigned) access: read only mechanism: by value
Access mode and protection for the new pages. The acmode argument is a longword containing the access mode. The $PSLDEF macro defines the following symbols for the four access modes.
Symbol Access Mode PSL$C_KERNEL Kernel PSL$C_EXEC Executive PSL$C_SUPER Supervisor PSL$C_USER User The most privileged access mode used is the access mode of the caller. The protection of the pages is read/write for the resultant access mode and those more privileged.
The Create Virtual Address Space service adds a range of demand-zero allocation pages to a process's virtual address space for the execution of the current image.Pages are created starting at the address contained in the first longword of the location addressed by the inadr argument and ending with the second longword. The ending address can be lower than the starting address. The retadr argument indicates the byte addresses of the pages created.
If an error occurs while pages are being created, the retadr argument, if specified, indicates the pages that were successfully created before the error occurred. If no pages were created, both longwords of the retadr argument contain the value --1.
If $CRETVA creates pages that already exist, the service deletes those pages if they are not owned by a more privileged access mode than that of the caller. Any such deleted pages are reinitialized as demand-zero pages. For this reason, it is important to use the retadr argument to capture the address range actually created. Because the Alpha architecture has a larger page size than the VAX architecture, more space is potentially affected on Alpha systems.
Required Access or Privileges
Required Quota
The paging file quota (PGFLQUOTA) of the process must be sufficient to accommodate the increased size of the virtual address space.
Related Services
$ADJSTK, $ADJWSL, $CRMPSC, $DELTVA, $DGBLSC, $EXPREG, $LCKPAG, $LKWSET, $MGBLSC, $PURGWS, $SETPRT, $SETSTK, $SETSWM, $ULKPAG, $ULWSET, $UPDSEC, $UPDSECW
The Expand Program/Control Region ($EXPREG) service also adds pages to a process's virtual address space.
Note
Do not use the $CRETVA system service in conjunction with other user-written procedures or Digital-supplied procedures (including Run-Time Library procedures). This system service provides no means to communicate a change in virtual address space with other routines. Digital recommends that you use either $EXPREG or the Run-Time Library procedure Allocate Virtual Memory (LIB$GET_VM) to get memory. You can find documentation on LIB$GET_VM in the OpenVMS RTL Library (LIB$) Manual. When using $DELTVA, you should take care to delete only pages that you have specifically created.
SS$_NORMAL The service completed successfully. SS$_ACCVIO The inadr argument cannot be read by the caller, or the retadr argument cannot be written by the caller. SS$_EXQUOTA The process has exceeded its paging file quota. SS$_INSFWSL The process's working set limit is not large enough to accommodate the increased size of the virtual address space. SS$_NOPRIV A page in the specified range is in the system address space. SS$_NOSHPTS A virtual address within a shared page table region was specified. SS$_PAGOWNVIO A page in the specified range already exists and cannot be deleted because it is owned by a more privileged access mode than that of the caller. SS$_VASFULL The process's virtual address space is full; no space is available in the page tables for the requested pages.
On Alpha systems, adds a range of demand-zero allocation pages to a process's virtual address space for the execution of the current image. The new pages are added at the virtual address specified by the caller.This service accepts 64-bit addresses.
SYS$CRETVA_64 region_id_64 ,start_va_64 ,length_64 ,acmode ,flags ,return_va_64 ,return_length_64
int sys$cretva_64 (struct _generic_64 *region_id_64, void *start_va_64, unsigned __int64 length_64, unsigned int acmode, unsigned int flags, void *(*(return_va_64)), unsigned __int64 *return_length_64);
region_id_64
OpenVMS usage: region identifier type: quadword (unsigned) access: read only mechanism: by 32- or 64-bit reference
The region ID associated with the region to create the virtual address range. The file VADEF.H in SYS$STARLET_C.TLB and the $VADEF macro in STARLET.MLB define a symbolic name for each of the three default regions in P0, P1, and P2 space.The following region IDs are defined:
Symbol Region VA$C_P0 Program region VA$C_P1 Control region VA$C_P2 64-bit program region Other region IDs, as returned by the $CREATE_REGION_64 service, can be specified. Also, given a particular virtual address, the region ID for the region it is in can be obtained by calling the $GET_REGION_INFO system service specifying the VA$_REGSUM_BY_VA function.
start_va_64
OpenVMS usage: address type: quadword address access: read only mechanism: by value
The starting address for the created virtual address range. The specified virtual address must be a CPU-specific page aligned address.length_64
OpenVMS usage: byte count type: quadword (unsigned) access: read only mechanism: by value
Length of the virtual address space to be created. The length specified must be a multiple of CPU-specific pages.acmode
OpenVMS usage: access_mode type: longword (unsigned) access: read only mechanism: by value
Access mode associated with the call to $CRETVA_64. The access mode determines the owner mode of the pages as well as the read and write protection on the pages. The acmode argument is a longword containing the access mode.The $PSLDEF macro in STARLET.MLB and the file PSLDEF.H in SYS$STARLET_C.TLB define the following symbols and their values for the four access modes:
Value Symbolic Name Access Mode 0 PSL$C_KERNEL Kernel 1 PSL$C_EXEC Executive 2 PSL$C_SUPER Supervisor 3 PSL$C_USER User The $CRETVA_64 service uses whichever of the following access modes is least privileged:
- Access mode specified by the acmode argument
- Access mode of the caller
The protection of the pages is read/write for the resultant access mode and those more privileged.
Address space cannot be created within a region that has a create mode associated with it that is more privileged than the caller's mode. The condition value SS$_IVACMODE is returned if the caller is less privileged than the create mode for the region.
flags
OpenVMS usage: mask_longword type: longword (unsigned) access: read only mechanism: by value
Flag mask controlling the characteristics of the demand-zero pages created. The flags argument is a longword bit vector in which each bit corresponds to a flag. The $VADEF macro and the VADEF.H file define a symbolic name for each flag. You construct the flags argument by performing a logical OR operation on the symbol names for all desired flags.The following table describes the flag that is valid for the $CRETVA_64 service:
Flag Description VA$M_NO_OVERMAP Pages cannot overmap existing address space. By default, pages can overmap existing address space.
Previous | Next | Contents | [Home] | [Comments] | [Ordering info] | [Help]
![]()
4527P016.HTM OSSG Documentation 22-NOV-1996 12:59:06.74Copyright © Digital Equipment Corporation 1996. All Rights Reserved.