Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getcompat(2) — A/UX 0.7

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

fork(2)

set42sig(2)

signal(3)

sigvec(2)

termio(7)

ps(1)



     setcompat(2)                                         setcompat(2)



     NAME
          setcompat, getcompat - set or get process compatibility mode

     SYNOPSIS
          #include <compat.h>

          int setcompat (flags)
          int flags;

          int getcompat ()

     DESCRIPTION
          setcompat sets a process's compatibility mode according to
          the flags argument.  flags governs the type of compatibility
          enforced.  flags may be COMPATSVID for strictest adherence
          to the System V interface definition or the bitwise or of
          one or more of the following symbolic constants:

          COMPATBSDGROUPS  Enables the use of the 4.2BSD groups code
                            which permits users to be members of more
                            than one group simultaneously and creates
                            files whose group is determined by the
                            group of the directory in which the file
                            is created.

          COMPATBSDNBIO    Allows the use of 4.2BSD non-blocking I/O
                            code for devices other than sockets.  I/O
                            operations may return -1 with errno set to
                            EWOULDBLOCK instead of returning 0.

          COMPATBSDPROT    Changes the permissions granted to a
                            setuid program.  When selected, the
                            program will be granted the union of the
                            permissions of the effective user/group
                            ID, and the real user/group ID.

          COMPATBSDSIGNALS Allows a process to use 4.2BSD-compatible
                            signals.  If set, this flag may not be
                            cleared unless no signals are currently
                            pending, caught, or held.  This option
                            enables reliable signal delivery.  Caught
                            signals will be held while a signal
                            handler is invoked, and reset upon exit
                            from the signal hander.

          COMPATBSDTTY     Enables 4.2 job control.  When first set,
                            this process and its (XXX sp) descendents
                            will be identified as 4.2 processes via a
                            bit in the flag word of the kernel proc
                            data structure.  Membership in a 4.2
                            process group persists across exec system
                            calls.  Jobs that are 4.2 process group



     Page 1                                        (last mod. 1/15/87)





     setcompat(2)                                         setcompat(2)



                            members are effected by job control
                            signals.  When COMPATBSDTTY is set the
                            setpgrp system call may be used to
                            manipulate the process group of (XXX sp)
                            descendent processes.  Normally
                            COMPATBSDTTY is set by a login shell.

          COMPATCLRPGRP    Resets the 4.2 process group bit in the
                            flag word of the kernel proc data
                            structure.  It may be used by a 5.2
                            process which wants to sever any job
                            control associations with an invoking
                            shell.  This bit provides a ``one shot''
                            clear.  When read by getcompat , this bit
                            is always zero.

          COMPATSYSCALLS   If selected, read, write, or wait calls
                            which are interrupted by a signal handler
                            will not return an EINTR error, but will
                            instead resume at the point they were
                            interrupted.

          getcompat returns the current process compatibility flags.
          Compatibility flags are preserved across forks and are reset
          by execs.

          setcompat will return the following error codes:


          [EINVAL]     cmd is COMPATBSDSIGNALS and a signal is
                       currently pending, caught, or held.


     RETURN VALUE
          Upon successful completion, setcompat returns the previous
          compatibility mask and getcompat returns the current
          compatibility mask.  Otherwise, a value of -1 is returned
          and errno is set to indicate the error.

     SEE ALSO
          exec(2), fork(2), set42sig(2), signal(3), sigvec(2),
          termio(7), ps(1).













     Page 2                                        (last mod. 1/15/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026