⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os2exec.doc

📁 dos下执行OS/2程序
💻 DOC
字号:
===============================================================================
os2exec.doc   EXECUTING OS/2 PROGRAMS FROM DOS SESSION      1.1a    30-Nov-1993
===============================================================================
                                     Copyright (c) 1992-1993 by Eberhard Mattes

Enclosed you'll find the following files:

os2exec.doc     This file
os2exec.c       Source for os2exec.exe
os2exec.exe     DOS program to execute OS/2 programs
os2execd.c      Source for os2execd.exe
os2execd.exe    OS/2 program which receives requests from DOS programs
makefile        Makefile for compiling the two programs


os2exec and os2execd are copyright (c) 1992-1993 by Eberhard Mattes.
All rights are reserved.  Copying of these files is authorized only if
(1) you are Eberhard Mattes, or if
(2) you make absolutely no changes to your copy, or
(3) you rename os2execd and os2exec and change the name of the named
    pipe to something different from \pipe\os2exec.em

These restrictions are required to ensure that existing applications
continue to work if you change os2execd.


Usage:

Run

  os2execd

in a OS/2 session.  The following command line options are available:

  -s  switch windows (make the os2execd session active when executing
      a command, switch back after executing the command).  os2exec
      can override this option

  -v  verbose mode (display information for debugging)


Type

  os2exec <command>

in a DOS session to let os2execd execute the OS/2 command <command> by
invoking CMD.EXE.  All environment variables with the exception of
COMSPEC, PROMPT and PATH are passed to the OS/2 session.  You can
precede <command> with the following options:

  -o    redirect standard output and standard error of the OS/2
        command to standard output of os2exec.  You'll see the output
        of the OS/2 program in the DOS session

  -sn   don't switch windows; this option temporarily turns off the -s
        option of os2execd

  -sy   do switch windows; this option temporarily turns on the -s
        option of os2execd

  -x    don't call CMD.EXE, execute the program directly instead

Example:

  os2exec -x -sy editor myfile.txt

Type

  os2exec -q

in a DOS session to make os2execd quit.


If one os2execd is running, only one DOS program at a time can connect
to os2execd.  To allow for more DOS programs connecting to os2execd,
run multiple instances of os2execd.


If you want to write a DOS program which uses os2execd, here's what
you have to do:

  - open a file named \pipe\os2exec.em in read/write mode

  - send messages

  - wait for response

  - close the file

Messages start with two bytes indicating the length of the message.
These two bytes are not included in the length.  The low-order byte of
the length is sent first.

The third byte of a message is a command character.  The following
commands are available:

  A  Acknowledge for return code

  C  Execute command by CMD.EXE: command

  E  Send environment variable: name=value

  O  Send standard output and standard error of the next command

  Q  Stop os2execd.  You should wait for acknowledge before closing
     the file

  S  Turn switching windows on or off (override the -s option of
     os2exec).  The argument should be one character:

        D  revert to the setting of -s given on the command line of
           os2execd (this is done automatically when estabilish a new
           connection)

        N  turn -s off

        Y  turn -s on

  W  Set working directory: directory or d:directory

  X  Execute command directly: command

Starting at the forth byte the argument (see list above, the command
is shown after the colon) should be sent.

os2execd sends back a response for the C and X commands using the same
length/command/arguments format.  The following command bytes are
defined:

  A  Acknowledge for Q command

  O  Output from the program; the argument contains the output (up to
     256 bytes at a time)

  R  Program executed: return code (or -1 if failed)


NO WARRANTY: No guarantee is made as to the proper functioning of the
software.  No liability will be admitted for damage resulting from
using the software.

The author of os2exec and os2execd is:

  Eberhard Mattes
  Teckstra醗 81
  D-71696 M攇lingen
  Germany

  Internet: mattes@azu.informatik.uni-stuttgart.de        (subject to change)

No telephone calls please! It must be stressed that the author does
not reply to letters if you don't include return postage
(international postal reply coupon if you're outside Germany) and a
self-addressed envelope.

                                  -- END --

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -