YAASPP NOT Solved?

Robin D. Wilson robin at batcomp.austin.ibm.com
Thu Jan 31 11:09:36 AEST 1991


In article <1510 at msa3b.UUCP> kevin at msa3b.UUCP (Kevin P. Kleinfelter) writes:
>Consider the following: 
>  HUPCL is set in LOGMODES and RUNMODES for the port;
>  A user logs-in and executes "stty -hupcl";
>Now, "pdisable -a" does NOT drop DTR on his modem.  My assertion is NOT
>that HUPCL does not work -- my assertion is that pdisable should do whatever
>is necessary to "disable" the port, and that a "disabled port" should have
>DTR low, because the "data terminal" is NOT ready.  The actions of a USER
>should not impact the effect of pdisable by an ADMINISTRATOR.

The ONLY purpose of pdisable is to turn off the getty running on the port.  It
is not intended to change tty settings, or "disable" usage of a port... Only
to disable the "getty" process on that port.  When pdisable is issue on a 
port that has set "stty -hupcl", it actually kills the process running on the
port, and sets the inittab entry for that port to "off" instead of "respawn".

The port can still be used for dial-out connections, or for other porgrams 
that any user has permission to start on the port.  HOWEVER, if the user has
set "-hupcl" the simple act of "closing" the port (via the "close()") system
call, will not cause the device driver to drop DTR.  That is the design.


>If pdisable does not drop dtr, then how is the system administrator to
>disable all logins and drop all DTR? The following will NOT work:
>
>    for x in 1 2 3 4 5 6 7 8
>    do
>       stty hupcl < /dev/tty$x
>       pdisable $x
>    done
>because the port may have "-clocal" set and have CD low, causing the stty
>to hang.

To begin with, you don't have a problem if CD is low... (There is nobody 
logged in, so disabling the port will prevent new logins.)  BUT....

If the attribute "hupcl" is set in the SMIT "stty attributes at LOGIN" then
simply "penable" the port, and pdisable it again.  This will reset the "-hupcl"
to "hupcl" (and any other stty attributes the user might have set).  BTW, it is
crucial that the port be "PENABLE'd" and not PSTART'ed, PSHARE'd, or PDELAY'ed
because share and delay should wait for a CD signal to reset the stty
attributes but ENABLE should do it right away.  

-- 
+-----------------------------------------------------------------------------+
|The views expressed herein, are the sole responsibility of the typist at hand|
+-----------------------------------------------------------------------------+
|UUCP:     robin%aixserv at uunet.uu.net                                         |
|USNail:   701 Canyon Bend Dr.                                                |
|          Pflugerville, TX  78660                                            |
|          Home: (512)251-6889      Work: (512)823-3015                       |
+-----------------------------------------------------------------------------+



More information about the Comp.unix.aix mailing list