Discussion:
What is "stty swtch" ?
(too old to reply)
Kenny McCormack
2004-10-01 15:32:42 UTC
Permalink
When I do "stty", it shows something called "swtch" (in and among such
things as "intr" and "quit"). "man stty" mentions "swtch", but doesn't
explain it. I could find no other reference to it in the man pages (at
least those that I looked at).

What is it?
Stephane CHAZELAS
2004-10-01 15:57:42 UTC
Permalink
Post by Kenny McCormack
When I do "stty", it shows something called "swtch" (in and among such
things as "intr" and "quit"). "man stty" mentions "swtch", but doesn't
explain it. I could find no other reference to it in the man pages (at
least those that I looked at).
What is it?
From termio man page:
SWTCH (Control-z or ASCII EM) is used only when shl layers
is invoked.

SUSP (Control-z or ASCII SUB) generates a SIGTSTP signal.
SIGTSTP stops all processes in the foreground process
group for that terminal.

I have no idea what "shl layers" are.
--
Stephane
Stephane CHAZELAS
2004-10-01 16:05:49 UTC
Permalink
2004-10-01, 15:57(+00), Stephane CHAZELAS:
[...]
Post by Stephane CHAZELAS
SWTCH (Control-z or ASCII EM) is used only when shl layers
is invoked.
[...]
Post by Stephane CHAZELAS
I have no idea what "shl layers" are.
I just found that:
http://heirloom.sourceforge.net/man/shl.1.html

shl provides a method to handle multiple shells in parallel
on a single terminal. Each shell is put in its own session
and has its own controlling pseudo-terminal. At a time, one
shell layer can receive input, but output is multiplexed
from all layers. When the SWTCH key (assigned to ^Z at
startup if unset) is pressed, shl takes control over the
terminal and allows the user to manage layers. The prompt
Post by Stephane CHAZELAS
is used by shl when commands may be entered.
Seems the "shl" SysV command disapeared but the SWTCH key
remaind...
--
Stephane
Roland Mainz
2004-10-02 02:31:44 UTC
Permalink
Post by Stephane CHAZELAS
Seems the "shl" SysV command disapeared but the SWTCH key
remaind...
Why was "shl" removed from Solaris ?

----

Bye,
Roland
--
__ . . __
(o.\ \/ /.o) ***@nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
Jonathan Adams
2004-10-02 03:30:20 UTC
Permalink
Post by Roland Mainz
Post by Stephane CHAZELAS
Seems the "shl" SysV command disapeared but the SWTCH key
remaind...
Why was "shl" removed from Solaris ?
As far as I can tell, it was never *in* Solaris -- while the SysV
Release 4.0 sources have usr/src/cmd/shl, no such directory appears in
the SunOS 5.0/Solaris 2.0 source base. Presumably, it wasn't thought to
be useful.

In fact, Solaris never shipped the "sxt" driver that was required for
shl's function. In the current source, the SWTCH character is swallowed
up and ignored.

Cheers,
- jonathan
Roland Mainz
2004-10-02 04:01:51 UTC
Permalink
Post by Jonathan Adams
Post by Roland Mainz
Why was "shl" removed from Solaris ?
As far as I can tell, it was never *in* Solaris -- while the SysV
Release 4.0 sources have usr/src/cmd/shl, no such directory appears in
the SunOS 5.0/Solaris 2.0 source base. Presumably, it wasn't thought to
be useful.
In fact, Solaris never shipped the "sxt" driver that was required for
shl's function. In the current source, the SWTCH character is swallowed
up and ignored.
Would it make sense to file a RFE to get "shl" back ? At least the
functionality sounds interesting... :)

----

Bye,
Roland
--
__ . . __
(o.\ \/ /.o) ***@nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
Jim Prescott
2004-10-04 17:35:06 UTC
Permalink
Post by Roland Mainz
As far as I can tell, [shl] was never *in* Solaris
Would it make sense to file a RFE to get "shl" back ? At least the
functionality sounds interesting... :)
shl was a way to get some job control functionality without going
through all the effort involved in full BSD job control. If you've
already got full job control there is little point in also adding a
crippled version. Especially at this late date since there doesn't
appear to be a large base of established shl users who really just
can't get the hang of BSD job control.

It has been many many moons since I used shl on an NCR tower running
some version of SysV but as I recall it didn't involve signals at all,
the processes themselves never knew they were "stopped". Stopping and
continuing were based solely on a subprocess of shl needing to do
terminal I/O. You had to manually tell things like vi to refresh the
screen. I don't think you could get asynchronous notification that a
backgrounded task was ready to talk to you again.

Nowadays I would think you could write an shl clone pretty easily using
ptys; I think the only reason it needed the sxt driver was that ptys
were not widely available.

It was cool when it was the only way to do multiple things over your
single serial connected CRT. Job control, and now multiple windows are
more more usable approaches.
--
Jim Prescott - Computing and Networking Group ***@seas.rochester.edu
School of Engineering and Applied Sciences, University of Rochester, NY
Stephane CHAZELAS
2004-10-05 07:44:59 UTC
Permalink
2004-10-4, 13:35(-04), Jim Prescott:
[...]
Post by Jim Prescott
Nowadays I would think you could write an shl clone pretty easily using
ptys; I think the only reason it needed the sxt driver was that ptys
were not widely available.
[...]

The URL I gave in another post was for such one:

NOTES in the source tarball:

<<
shl, the shell layer manager

shl can run multiple shells in parallel on a single terminal. It was
originally introduced in AT&T's SVr3 Unix, but discontinued by most
vendors later since csh-style job control was considered superior.
This free implementation avoids most of the complications by using
regular SVR4-style pseudo terminals; it can be used together with
job control. The user-visible differences to the original shl are:

* The layer terminal devices are /dev/pts/* instead of
/dev/sxt/*.

* The stty loblk and stty -loblk commands have no effect;
there is no way to block output from within a layer.

* Blocking a layer will stop its output from appearing on
the user's terminal, but programs within the layer will
continue to write() until the pseudo terminal's buffers
are filled.

With these exceptions, this implementation should conform to the
description given in shl(AU_CMD) of the System V Interface Definition,
Third Edition. It also contains some SCO and HP-UX extensions.

shl has been tested on:

Solaris 8, 2.6
UnixWare 7.1.1, 2.1
Linux 2.6, 2.4 with glibc 2.2, 2.3

It should run on most SVR4-like systems; please contact me to extend
this list and send a diff if necessary.

Gunnar Ritter 2/21/04
See: http://heirloom.sourceforge.net/
--
Stephane
Joerg Schilling
2004-10-02 10:27:58 UTC
Permalink
Post by Roland Mainz
Post by Stephane CHAZELAS
Seems the "shl" SysV command disapeared but the SWTCH key
remaind...
Why was "shl" removed from Solaris ?
Have you been able to use it or do you know someone who did?
--
EMail:***@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
***@cs.tu-berlin.de (uni) If you don't have iso-8859-1
***@fokus.fraunhofer.de (work) chars I am J"org Schilling
URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
Roland Mainz
2004-10-02 16:12:06 UTC
Permalink
Post by Joerg Schilling
Post by Roland Mainz
Post by Stephane CHAZELAS
Seems the "shl" SysV command disapeared but the SWTCH key
remaind...
Why was "shl" removed from Solaris ?
Have you been able to use it or do you know someone who did?
No, it's just described in an old Unix book. I thought the early Solaris
2.x versions really had most of the SYSV-commands and -features
(remember it even supported RFS... =:-) ... it seems this is one of the
exceptions...

----

Bye,
Roland
--
__ . . __
(o.\ \/ /.o) ***@nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
Joerg Schilling
2004-10-02 10:24:56 UTC
Permalink
Post by Stephane CHAZELAS
[...]
Post by Stephane CHAZELAS
SWTCH (Control-z or ASCII EM) is used only when shl layers
is invoked.
[...]
Post by Stephane CHAZELAS
I have no idea what "shl layers" are.
http://heirloom.sourceforge.net/man/shl.1.html
shl provides a method to handle multiple shells in parallel
on a single terminal. Each shell is put in its own session
and has its own controlling pseudo-terminal. At a time, one
shell layer can receive input, but output is multiplexed
from all layers. When the SWTCH key (assigned to ^Z at
startup if unset) is pressed, shl takes control over the
terminal and allows the user to manage layers. The prompt
Post by Stephane CHAZELAS
is used by shl when commands may be entered.
Seems the "shl" SysV command disapeared but the SWTCH key
remaind...
This has been introduced in SVSvr3 and did never work as documented.

I did try it myself and know of several people who have not been
able to use it.....
--
EMail:***@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
***@cs.tu-berlin.de (uni) If you don't have iso-8859-1
***@fokus.fraunhofer.de (work) chars I am J"org Schilling
URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
Rich Teer
2004-10-01 16:07:33 UTC
Permalink
Post by Stephane CHAZELAS
SWTCH (Control-z or ASCII EM) is used only when shl layers
is invoked.
SUSP (Control-z or ASCII SUB) generates a SIGTSTP signal.
SIGTSTP stops all processes in the foreground process
group for that terminal.
I have no idea what "shl layers" are.
The "Terminal I/O" chapter of my book explains all. :-)
--
Rich Teer, SCNA, SCSA, author of "Solaris Systems Programming",
published in August 2004.

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
Andrew Gabriel
2004-10-01 16:15:46 UTC
Permalink
Post by Kenny McCormack
When I do "stty", it shows something called "swtch" (in and among such
things as "intr" and "quit"). "man stty" mentions "swtch", but doesn't
explain it. I could find no other reference to it in the man pages (at
least those that I looked at).
What is it?
It's obsolete. It was the character for switching shells under
shl - shell layers. When shells with job control came along,
it became redundent.
--
Andrew Gabriel
Barry Margolin
2004-10-02 04:07:13 UTC
Permalink
Post by Andrew Gabriel
Post by Kenny McCormack
When I do "stty", it shows something called "swtch" (in and among such
things as "intr" and "quit"). "man stty" mentions "swtch", but doesn't
explain it. I could find no other reference to it in the man pages (at
least those that I looked at).
What is it?
It's obsolete. It was the character for switching shells under
shl - shell layers. When shells with job control came along,
it became redundent.
And then when window systems and applications like "screen" came along,
it because *really* obsolete.
--
Barry Margolin, ***@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Joerg Schilling
2004-10-02 10:34:38 UTC
Permalink
Post by Barry Margolin
Post by Andrew Gabriel
It's obsolete. It was the character for switching shells under
shl - shell layers. When shells with job control came along,
it became redundent.
And then when window systems and applications like "screen" came along,
it because *really* obsolete.
Screen is older. Screen is from Carsten Borman & Oliver Laumann at TU-Berlin
ans was in use long before SVSvr3 came out.
--
EMail:***@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
***@cs.tu-berlin.de (uni) If you don't have iso-8859-1
***@fokus.fraunhofer.de (work) chars I am J"org Schilling
URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
Kenny McCormack
2004-10-02 13:51:25 UTC
Permalink
Post by Joerg Schilling
Post by Barry Margolin
Post by Andrew Gabriel
It's obsolete. It was the character for switching shells under
shl - shell layers. When shells with job control came along,
it became redundent.
And then when window systems and applications like "screen" came along,
it because *really* obsolete.
Screen is older. Screen is from Carsten Borman & Oliver Laumann at TU-Berlin
ans was in use long before SVSvr3 came out.
shl existed in the early 80s. I actually liked it better than BSD style
"job control". But, certainly screen makes it all obsolete.
Loading...