MKS Toolkit - Running / Porting UNIX to Windows

Build Better Software ™

MKS Interoperability Times

SUMMER 2009 EDITION

MKS Software Inc.

Message to ALL Developers, by a Developer

By Alan Brown, Director of Engineering, MKS

With the upcoming release of Microsoft Windows 7, the time has come to look at how well this new operating system gets along with the MKS Toolkit and fix any issues that our customers may encounter when moving to this new operating system. Microsoft has taken an unusual approach with the development of Windows 7. First, Microsoft released a public beta without the normal step of a preceding closed beta. And now, they have taken the even more unusual approach of issuing a public release candidate. As a result, we here at MKS got our first look at Windows 7 at the same time as you, our customers, did. This gave us no time to correct any issues that we might find and plan for a release. It appears that Microsoft thought Windows 7 was similar enough to Vista and thus, they could take this approach without creating any real issues.  

As we normally do with new operating systems, we installed both the x86 and x64 versions of Windows on a virtual machine and began by attempting to install MKS Toolkit. This resulted in several problems; however, while the installer was running, Windows Update delivered a number of operating system fixes. Thus, when we went back to analyze the problems, they were all gone. It took reinstalling the OS a couple of times to convince us that no problems existed with the MKS Toolkit installation process.  

Once we had MKS Toolkit installed successfully, it was time for the various Toolkit components to be examined with our standard suite of regression tests. This testing uncovered four problems:
  1. The ROOTDIR environment variable was set to "C:\Program Files\MKS Toolkit" instead of an expected 8.3 name (that is, a DOS-style file name of the form XXXXXXXX.XXX) such as "C:\PROGRA~1\MKSTOO~1". MKS Toolkit uses such auto-generated short names to remove spaces from file and directory names to avoid problems with UNIX programs and scripts. The MKS Toolkit installer has code to ensure 8.3 names are enabled in the registry. Examining the registry key with the Windows fsutil utility resulted in the following:   C:\ >fsutil 8dot3name query The registry state of NtfsDisable8dot3NameCreation is 2, the default (Volume level setting). This setting of 2 was new. As it turns out, Microsoft has added the ability in Windows 7 to disable 8.3 names on a per volume basis. Thus, the search began for an API that would tell us whether or not 8.3 names were enabled. Fortunately, we found the DeviceIOControl() API which is defined in ntfs.h in the new Windows 7 DDK and can accomplish this task.   The installer was improved to use this API so that it could tell if 8.3 names were disabled for the volume on which MKS Toolkit was installed and if so, correctly suggest an installation path name without spaces. This will allow your scripts to continue to run on Windows without any changes.   Additionally, the ability to report whether or not 8.3 names are disabled on a volume will be added to an existing utility (likely "sysinf drives -a") in our constant efforts to find ways to present new operating system features through our Windows-specific toolset.
  2. The su utility failed with the message "Network API entry points not available" on x64 machines. We soon discovered this was related to disabling file system redirection for 32-bit applications on x64. Once disabled, the LoadLibrary() API succeed in netappi32.dll but the GetProcAddress() API was failing. Suspecting this was a likely a problem with the operating system itself, we put together a test case and submitted it to Microsoft. Unfortunately, this issue was not fixed in the release candidate. However, we were prepared for this and have rewritten our code for disabling file system redirection to avoid the problem and at the same time, fixed a few related bugs.
  3. MKS KornShell was failing to fork(). Further examination showed this was due to the SetHandleInformation() API failing on a console handle. On the older NT 3.1, NT 3.5, NT 4.0, and Windows 95 operating systems, we had to call the DuplicateHandle() API to enable and disable inheritance. When the SetHandleInformation() API was added in Windows 2000, we switched to using it but we did not fall back to using DuplicateHandle() when SetHandleInformation() failed because we expected that API to continue work successfully. When SetHandleInformation() began failing on Windows 7, we submitted the issue to Microsoft. While this issue was not fixed in the release candidate, we modified the MKS Toolkit code to include falling back to use DuplicateHandle() when SetHandleInformation() fails.  
  4.  Our Psuedo TTY support failed to operate correctly. Changes in Windows 7 required that we tweak code used to make this logic work.
With fixes in places for these problems, the issue of distributing these fixes presents a dilemma.  Our MKS Toolkit customers are often developers creating software for their customers and use our tools as part of their build environments. Thus, for them to be able to build or test their applications on Windows 7, they require a working MKS Toolkit. However, MKS does not "officially support" unreleased operating systems such as the Windows 7 beta or release candidate. To resolve this dilemma, MKS often releases a patch to the current MKS Toolkit version which provides an interim version of operating system compatibility.  

Currently, we are wrapping up the development of MKS Toolkit 9.2 Patch 3 which features the fixes described above in addition to fixes that are not related to Windows 7. This patch lets us offer an interim version of Windows 7 compatibility that will allow our customers to continue to operate successfully during this release candidate period. In the fall of 2009, we plan to release MKS Toolkit 9.5 which will include formal support for Windows 7.  

As a Preferred Customer Support (PCS) subscriber, you can receive MKS Toolkit 9.2 Patch 3 in the near feature. This patch will fix known problems with MKS Toolkit and the Windows 7 release candidate. While we will not accept Priority One problem reports against Windows 7-specific issues until the operating system is formally released by Microsoft, we will accept and fix problems at a lower priority.  

Because the interim Windows 7 compatibility requires a change to the installer, MKS Toolkit 9.2 Patch 3 cannot be handled in the normal way (that is, you cannot install MKS Toolkit 9.2 and apply the patch). Instead you will need to download an ISO image which you can install on Windows 7.  

We currently expect to release MKS Toolkit 9.2 Patch 3 by end of June 2009.  

you have MKS Toolkit licenses that are not currently covered by PCS, you should contact your MKS sales representative for information on updating and receiving the support you'll require as new versions of Microsoft's operating systems roll out. Ensuring that MKS Toolkit products continue to work on Microsoft's newest platforms is a major goal of the MKS Interoperability Division and one of the largest investments that MKS makes in this type of research and development.  Alan Brown is the Director of Engineering Interoperability Division and can be reached at dir_engineering@mks.com.

Upcoming MKS Events

Online Events:
Stickyminds Webinar: Habits of a Highly Effective Testing Organization - Proven Practices to Improve Your Quality System

Date:  Jun 16, 2009
Time:  2:00 PM to 3:00 PM, EDT
Details & Registration: http://w.on24.com/r.htm?e=144954&s=1&k=6E31F23A73C8CC17C1E9974BA62B783F&partnerref=MKS16B

Stickyminds Webinar: Habits of a Highly Effective Testing Organization - Proven Practices to Improve Your Quality System (European Session)

Date:  Jun 17, 2009
Time:  3:00 PM to 4:00 PM, BST
Details & Registration: http://w.on24.com/r.htm?e=144954&s=2&k=6E31F23A73C8CC17C1E9974BA62B783F&partnerref=MKS17A

MKS in the News

Insitu Accelerates CMMI Maturity for Software Engineering with MKS Integrity
Continuous improvement in CMMI maturity improves likelihood of contract awards

"We adopted CMMI to improve software quality. After only 10 months, we successfully achieved CMMI Level 3 compliance. This rapid success would not have been possible without MKS Integrity," said Gary i, Vice President of Electronic Systems at Insitu.  

Find out how Insitu decided on MKS Integrity as it scored well in its unified architecture and flexibility across the full lifecycle of software engineering. For the complete press release visit:  http://www.mks.com/press/index.jsp?action=readarticle&article_id=24744    

MKS Positioned as a Leader in the 2009 Magic Quadrant for Software Change and Configuration Management (SCCM) for Distributed Platforms
In Gartner's view, "SCCM tools are evolving on a path toward integrating tightly with or becoming generalized management platforms for requirements, test plans and other aspects of the application life cycle. Some products already have added multiplatform support and management support for non-code artifacts (including requirements, content, documentation, test case management, and code packaging and distribution)."  

MKS Integrity™ offers process-driven software change and configuration management capabilities as part of a single enterprise application lifecycle management platform.  Delivering traceability and visibility across the entire lifecycle, MKS Integrity coordinates and manages all activities and artifacts associated with software development, reliably supporting large numbers of users on a wide variety of platforms, across geographically distributed sites, and providing support for popular development best practices such as parallel development and software reuse.    Get your copy of this Gartner report, compliments of MKS: http://www.mks.com/iotimes_gartner_mq_sccm

MKS Toolkit Quick Tips

Q:   When installing the MKS Toolkit I get a Pending File Operation error. What is the problem?
A:
   There is a file in the $WINDIR directory called wininit.ini that is confusing Windows in to thinking there is an operation that is not yet complete. This file is not necessary on Windows NT-based systems (2000/XP/2003) and can safely be removed. The installation will proceed as designed afterwards.

Q:   I have disabled the MKS RSHD and REXECD ports through the Firewall Config section of the MKS Toolkit Control Panel applet. However, these services are still accepting connections?
A:
  There is delay from when these services close their last connection to when the firewall disables the port. By default, this delay is 4 minutes, but it can be minimized by modifying the following registry key.  

System Key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
Value Name: TcpTimedWaitDelay
Data Type: REG_DWORD (DWORD Value)
Value Data: 30-300 seconds (decimal)
Default: 0xF0 (240 decimal)

On some systems you will need to create this key, as it does not exist by default on all operating systems. Also, you will need to reboot before changes made to this key take effect.

Note: this registry key is not specific to the MKS rshd and rexecd services. Changes to this key will also effect other TCP connections.

Q:   How can I customize my MKS KornShell and get it to remember the changes?
A:
   When you start a login shell, either with sh -L or by using the shortcut installed for the MKS KornShell, two scripts are run in your HOME directory. They are profile.ksh and environ.ksh.  

environ.ksh: This script is run for every sub-shell of a login shell. Use it to define functions and alias or for any other settings that aren't inherited by a sub-shell.  

profile.ksh: This script is not run for each sub-shell. Use it to define things like exported variables which are automatically inherited by a sub-shell.  

In MKS Toolkit 5.2 and above there is a command called gset. It is located on the toolbar under Windows 9x and ME and can be used to make customizations to the KornShell. If the options Save Option Settings and Use Saved Options are checked under the Persistence tab, then the settings will be saved to the registry and reloaded the next time you start the shell.  

In addition to these, you can use the mks_env built-in command to save and restore your complete MKS KornShell environments. This allows you to set up shortcuts, for example, to your build environment, test environment, etc.. Refer to the mks_env reference page: http://www.mkssoftware.com/docs/man1/mks_env.1.asp for more information.

To get more MKS Toolkit Tips visit our knowledge base at: http://www.mkssoftware.com/support/kb/
To see more on the Porting Guide visit: http://www.mkssoftware.com/docs/sg/#uwpg

To download the Resource Kit visit: http://www.mkssoftware.com/reskit/
Buy MKS Products Online

MKS offers the convenience of purchasing our products directly from our Web Store. Buy and download today!
MKS now offers a 30-day UNCONDITIONAL guarantee:

http://webstore.mkssoftware.com/webstore/

MKS Inc. trusts this information is of interest to you. If you are no longer the correct contact for MKS Toolkit Product Family information or would prefer not to receive this Newsletter, please send a reply to this email with the words "Please Remove" at the beginning of the body of the message. If you know of others who might be interested in this information, please forward their name and email address to tk_info@mkssoftware.com.

Published by MKS Inc.
[ UNIX on Windows Home | Site Map | MKS Toolkit Products | Sales | Services | Support | RSS ]
[ PC X Server | Secure Shell (SSH) Solutions | Feedback |
© 1995 - 2024 MKS Inc. All Rights Reserved