This was filed as a Solaris bug against the GNU coreutils version of
stty. I don't know enough to determine whether there is a real problem
here on not, so forwarding to the experts.

/usr/bin/stty is the Solaris version of stty and /usr/gnu/bin/stty is
the one in GNU coreutils.

Thanks.

----

Description
    I have not investigated this thoroughly, but it would appear that GNU
    stty, feels that sanity involves no-oping job control, by setting the
    (ancient, never really used) swtch to ^z, causing it to be ignored,
    (susp is also ^z, but swtch wins).

    stty(1) describes sane thusly:

    sane                    Reset all modes to  some  reasonable
                                values.

I argue that values which apparently clobber job control are not reasonable.
    The GNU stty(1) says:

     sane same as cread -ignbrk brkint -inlcr -igncr icrnl -iutf8
          -ixoff  -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr
          -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0  vt0  ff0
          isig  icanon  iexten  echo  echoe echok -echonl -noflsh
          -xcase -tostop -echoprt  echoctl  echoke,  all  special
          characters to their default values

"all special characters to their default values", if swtch and susp really do
    default to ^z, swtch should be changed.

Frequency
    Always

Regression
    no


$ tcsh
> /usr/bin/stty -a
speed 38400 baud;
rows = 65; columns = 80; ypixels = 0; xpixels = 0;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-parenb -parodd cs8 -cstopb -hupcl cread -clocal -loblk -crtscts -crtsxoff -parext
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff -imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3

> /usr/bin/stty sane

> /usr/bin/stty -a
speed 38400 baud;
rows = 65; columns = 80; ypixels = 0; xpixels = 0;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-parenb -parodd cs8 -cstopb -hupcl cread -clocal -loblk -crtscts -crtsxoff -parext
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel

> /usr/gnu/bin/stty sane

> /usr/bin/stty -a
speed 38400 baud;
rows = 65; columns = 80; ypixels = 0; xpixels = 0;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = ^z;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-parenb -parodd cs8 -cstopb -hupcl cread -clocal -loblk -crtscts -crtsxoff -parext
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel
>

Expected Result
    swtch = undef, working job control via 'susp', ^Z

Actual Result
    ^z being both swtch and susp, ^Z not functioning for job control


Workaround
    explicitly specify /usr/bin/stty sane, when sanity is required.




Reply via email to