Annotation of researchv10dc/dist/man/v3/man2/exec.2, revision 1.1

1.1     ! root        1: .pa 1
        !             2: .he 'EXEC (II)'3/15/72'EXEC (II)'
        !             3: .ti 0
        !             4: NAME           exec  --  execute a file
        !             5: .sp
        !             6: .ti 0
        !             7: SYNOPSIS       sys exec; name; args  / exec = 11.
        !             8: .br
        !             9: .li
        !            10: ...
        !            11: .ti -6
        !            12: name: <...\\0>
        !            13: .br
        !            14: .li
        !            15: ...
        !            16: .ti -6
        !            17: args: arg1; arg2; ...; 0
        !            18: .ti -6
        !            19: arg1: <...\\0>
        !            20: .br
        !            21: .li
        !            22: ...
        !            23: .sp
        !            24: .ti 0
        !            25: DESCRIPTION    exec____
        !            26: overlays the calling process with the named file, then
        !            27: transfers to the
        !            28: beginning of the core image of the file.
        !            29: The first argument to exec____ is a pointer to the name of the file
        !            30: to be executed.
        !            31: The second is the address of a list of pointers to
        !            32: arguments to be passed to the file.
        !            33: Conventionally, the first argument is the name of the
        !            34: file.
        !            35: Each pointer addresses a string terminated by a null byte.
        !            36: .sp
        !            37: There can be no return from the file; the calling core image
        !            38: is lost.
        !            39: 
        !            40: The program break is set from the executed file; see the format
        !            41: of a.out.
        !            42: 
        !            43: Once the called file starts execution, the arguments are available
        !            44: as follows.
        !            45: The stack pointer points to a word containing the number of arguments.  Just above
        !            46: this number is a list of pointers to the argument strings.
        !            47: 
        !            48:   sp-> nargs
        !            49:        arg1
        !            50:        ...
        !            51:        argn
        !            52: 
        !            53:  arg1: <arg1\\0>
        !            54:        ...
        !            55:  argn: <argn\\0>
        !            56: 
        !            57: The arguments are placed as high as possible in core:
        !            58: just below 57000(8).
        !            59: 
        !            60: Files remain open across
        !            61: exec____ calls.  However, the illegal instruction, emt___, quit, and interrupt trap
        !            62: specifications are reset to the standard values.
        !            63: (See ilgins______, cemt____, quit____, intr____.)
        !            64: 
        !            65: Each user has a real____ user ID and an effective_________ user ID
        !            66: (The real ID identifies the person using the system;
        !            67: the effective ID determines his access privileges.)
        !            68: exec____ changes the effective user ID to
        !            69: the owner of the executed file if the file has the "set-user-ID"
        !            70: mode.  The real user ID is not affected.
        !            71: .sp
        !            72: .ti 0
        !            73: SEE ALSO       fork(II)
        !            74: .sp
        !            75: .ti 0
        !            76: DIAGNOSTICS    If
        !            77: the file cannot be read or if it is not executable, a return
        !            78: from exec____ constitutes the diagnostic.
        !            79: The error bit (c-bit) is set.
        !            80: .sp
        !            81: .ti 0
        !            82: BUGS           Very high core and
        !            83: very low core are used by exec____
        !            84: to construct the argument list
        !            85: for the new core image.
        !            86: If the original copies of the
        !            87: arguments reside in these places,
        !            88: problems can result.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.