Annotation of researchv10dc/630/man/src/p_man/man3/attach.3r, revision 1.1.1.1

1.1       root        1: .ds ZZ DEVELOPMENT PACKAGE
                      2: .TH ATTACH 3R "630 MTG"
                      3: .XE "attach()"
                      4: .SH NAME
                      5: attach \- connect process to host
                      6: .SH SYNOPSIS
                      7: .B int attach (host)
                      8: .br
                      9: .B int host;
                     10: .SH DESCRIPTION
                     11: A process that is already local may connect itself to a
                     12: host by calling the function \fIattach\fP.  It takes a
                     13: single argument indicating the host to be connected to. 
                     14: There are currently only two valid values, 0 and 1, that
                     15: refer to logical Host 1
                     16: and Host 2, respectively.  When a process is successfully
                     17: attached, the border for the window of that process becomes solid.
                     18: .PP
                     19: The resources owned by the process remain unchanged except for
                     20: the addition of a host connection.  The \fIattach\fP function operates
                     21: correctly independent of whether the host is already in \fBlayers\fR
                     22: mode or not.
                     23: .PP
                     24: The function can fail if the host has not been configured in the
                     25: set-up options; if there are not any available connections for the
                     26: specified host; if the process is already connected;
                     27: or if the host argument is invalid.  A failure
                     28: is indicated to the calling process by a return value of zero.
                     29: 
                     30: .SH EXAMPLE
                     31: This example shows how the \fIattach\fP function may be used in
                     32: a process that wishes to be connected
                     33: to the logical Host 2.
                     34: .PP
                     35: .RS 3
                     36: .nf
                     37: .ft CM
                     38: #include <dmd.h>
                     39: 
                     40: 
                     41: switchhost ()
                     42: {
                     43:        if (local())
                     44:                attach(1);
                     45:        
                     46: }
                     47: \fR
                     48: .fi
                     49: .RE
                     50: .SH SEE ALSO
                     51: local(3R), peel(3R).
                     52: .SH WARNING
                     53: The host values may change in meaning and/or be expanded in the future.

unix.superglobalmegacorp.com

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