|
OS2::Process - exports constants for system call on OS2. |
OS2::Process - exports constants for system() call on
OS2.
use OS2::Process;
$pid = system(P_PM+P_BACKGROUND, "epm.exe");
the builtin function system() under
OS/2 allows an optional first
argument which denotes the mode of the process. Note that this argument is
recognized only if it is strictly numerical.
You can use either one of the process modes:
P_WAIT (0) = wait until child terminates (default)
P_NOWAIT = do not wait until child terminates
P_SESSION = new session
P_DETACH = detached
P_PM = PM program
and optionally add PM and session option bits:
P_DEFAULT (0) = default
P_MINIMIZE = minimized
P_MAXIMIZE = maximized
P_FULLSCREEN = fullscreen (session only)
P_WINDOWED = windowed (session only)
P_FOREGROUND = foreground (if running in foreground)
P_BACKGROUND = background
P_NOCLOSE = don't close window on exit (session only)
P_QUOTE = quote all arguments
P_TILDE = MKS argument passing convention
P_UNRELATED = do not kill child when father terminates
Additionaly, subroutines my_type(), process_entry() and
file_type(file), get_title() and set_title(newtitle) are implemented.
my_type() returns the type of the current process (one of
``FS'',
``DOS'',
``VIO'',
``PM'',
``DETACH'' and
``UNKNOWN''), or undef on error.
file_type(file)file, or
dies on error. The bits 0-2 of the result contain one of the values
T_NOTSPEC (0)T_NOTWINDOWCOMPAT (1)T_WINDOWCOMPAT (2)T_WINDOWAPI (3)The remaining bits should be masked with the following values to determine the type of the executable:
T_BOUND (8)T_DLL (0x10)T_DOS (0x20)T_PHYSDRV (0x40)T_VIRTDRV (0x80)T_PROTDLL (0x100)T_32BIT (0x4000)file_type() may croak with one of the strings "Invalid EXE
signature" or "EXE marked invalid" to indicate typical error
conditions. If given non-absolute path, will look on PATH, will
add extention .exe if no extension is present (add extension .
to suppress).
process_entry()Ctrl-Esc list);
Ctrl-Esc list);
Ctrl-Esc list;
Ctrl-Esc list;
Ctrl-Esc list;
Ctrl-Esc list;
Ctrl-Esc list));
PROG_DEFAULT 0
PROG_FULLSCREEN 1
PROG_WINDOWABLEVIO 2
PROG_PM 3
PROG_VDM 4
PROG_WINDOWEDVDM 7
Although there are several other program types for WIN-OS/2 programs, these do not show up in this field. Instead, the PROG_VDM or PROG_WINDOWEDVDM program types are used. For instance, for PROG_31_STDSEAMLESSVDM, PROG_WINDOWEDVDM is used. This is because all the WIN-OS/2 programs run in DOS sessions. For example, if a program is a windowed WIN-OS/2 program, it runs in a PROG_WINDOWEDVDM session. Likewise, if it's a full-screen WIN-OS/2 program, it runs in a PROG_VDM session.
set_title(newtitle)help 372
for a funny - and wrong - explanation ;-).
get_title()
Andreas Kaiser <ak@ananke.s.bawue.de>, Ilya Zakharevich <ilya@math.ohio-state.edu>.
spawn*() system calls.
|
OS2::Process - exports constants for system call on OS2. |