Help - MKS Toolkit bug ?

Help - MKS Toolkit bug ?

Post by soups.. » Thu, 15 Jul 1999 04:00:00



help.  i am using the "unix services for nt"
from micro$oft and the accompanying mks toolkit,
running the telnet service on an nt4 server and
using the shell to do some korn shell scripting.

seems like this things hangs a lot.  to generate a
hang all i haveta do is:
- telnet to nt and log in
- create (using vi) a little text file
- enter this command:
  # cat littlefile | while read foo
  > do
  > print "$foo"
  > done

result is that the file contents will be sent to
the screen but then the thing hangs.  haveta
disconnect.  is mks whacked out ?  am i ?

the above example among many other things work
perfectly in a true unix environment.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 
 
 

Help - MKS Toolkit bug ?

Post by brian hile » Thu, 22 Jul 1999 04:00:00



> help.  i am using the "unix services for nt"
> from micro$oft and the accompanying mks toolkit,
> running the telnet service on an nt4 server and
> using the shell to do some korn shell scripting.
> seems like this things hangs a lot.  to generate a
> hang all i haveta do is:
> - telnet to nt and log in
> - create (using vi) a little text file
> - enter this command:
>   # cat littlefile | while read foo
>   > do
>   > print "$foo"
>   > done
> result is that the file contents will be sent to

Useless use of "cat"!!

while read foo
do      print -r --  "$foo"
done <littlefile

Quote:> the screen but then the thing hangs.  haveta
> disconnect.  is mks whacked out ?  am i ?
> the above example among many other things work
> perfectly in a true unix environment.

Although this is technically conjecture (because I use an NT telnet to
my ISPs NNTP services) I do not use and have not tested the above porblem
with MKS. However...

It sounds like you are encountering the classic problem of ksh's process
optiminization versus pseudo-terminals (xterm). The last command in a ksh
pipe, as a special case, is _not_ executed within a new process, but within
a new process _environment_ of the script/user-shell. This saves on one
process but plays havoc with pseudo-terminals that apparently react poorly
to this.

As MKS ksh is a licensed ksh88 from distribution Unix, I presume that
this is the salient problem. To test: execute the entire thing within a
new subshell. Does the problem go away?

(while read foo
do      print -r --  "$foo"
done <littlefile)

or,

(while read foo
do      print -r --  "$foo"
done) <littlefile

Reply back to this newgroup to tell me if this indeed was the nature of the
problem. After all, gurus get curious too! :)

-Brian

 
 
 

1. Interested in an MKS Web Toolkit?

Dear UNIX Users,

We're MKS, Mortice Kern Systems, Inc., creators of MKS Toolkit.
For more than 10 years now, MKS been dedicated to open standards and
creating software that eliminates the pains of the development
community. MKS Toolkit is a solution for developers, testers, and
Webmasters that provides a powerful suite of 190+ UNIX and Windows
utilities for PC platforms. MKS Toolkit includes awk, Perl, make,
Visual KornShell, vi, Visual Pax, grep, and more, and is available for
DOS, Windows 3.1, OS/2, Win95 and Windows NT.

Our research shows that many UNIX developers, like yourselves, are
developing content and applications for the World Wide Web. An
increasing number of companies are implementing Intranets and Internets,
and are using both UNIX and NT servers. So, we'd like to know how MKS
can help you in your new Web development environment, and what features
and functionality you'd like MKS to provide in a Web Toolkit
to help you with Web development.

Your feedback and comments will go directly to the "Web Toolkit"
development team. Are you a Web developer?  Would you benefit from the
creation of a Web Toolkit?  If the answers are a resounding, "Yes!",
then please come to our Web site and fill out our questionnaire.  The
URL is http://www.mks.com/tellmore/webtk.htm.  In appreciation of your
time, we'll send you a set of PC PUCKS.

Thanks for your help!

Michelle Kow
Market Research, MKS

2. Cirrus Logic Graphics Cards with X

3. MKS ToolKit

4. RedHat 4.0 not recognizing entire drive during install

5. MKS TOOLKIT

6. Samba & ip_masq

7. mks toolkit - nutcracker workstation

8. desktop shortcuts

9. MKS Toolkit C shell - history editing OR file name completion

10. Interested in an MKS Web Toolkit?

11. Performing tape backups with MKS Toolkit

12. MKS Toolkit : Random problem copying files from Unix to Windows 95

13. MKS Toolkit