delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/12/26/15:02:54

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Message-ID: <3C2A2C5E.45353EA7@ieee.org>
From: Don Duttweiler <duttweiler AT ieee DOT org>
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.9 i686)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: start.exe, bash, PIFs, and Win 98
Lines: 94
Date: Wed, 26 Dec 2001 19:56:38 GMT
NNTP-Posting-Host: 24.15.132.206
X-Complaints-To: abuse AT home DOT net
X-Trace: news1.rdc1.sdca.home.com 1009396598 24.15.132.206 (Wed, 26 Dec 2001 11:56:38 PST)
NNTP-Posting-Date: Wed, 26 Dec 2001 11:56:38 PST
Organization: Excite AT Home - The Leader in Broadband http://home.com/faster
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

The Win 98 binary start.exe allows you to initiate executation
of a PIF from a DOS window.  Things don't work quite right
though if the DOS window is running Bash instead of command.com.
Details follow.  I want to be able to do this because of a
desire to use makefiles from a DOS window while developing
programs that must run in DOS mode (as opposed to just a DOS
window).  The start.exe command lets you automatically trigger
the switch to DOS mode from within the makefile.  Win 98 is the
last of Microsoft's offerings supporting real-mode DOS so this
is not an issue on the most recent Windows versions just because
real-mode DOS has gone away.

Details:
    1) On a system running Win 98 create a pif, say pifTest.pif.
    2) The file attributes settable under the "General" tab
       don't seem to be of consequence for what follows.  For
       concreteness though use what seems to be the default,
       which is to have the Archive bit set and the others clear.
    3) Under the "Program" tab enter the command line
           c:\windows\command\mem.exe.
       Select "Close on exit" although this particular choice
       also seems inconsequential for what follows.
    4) Under the "Advanced" tab choose "MS-DOS mode."  This
       is crucial, the problem goes away if MS-DOS mode is
       not forced.  It is true that mem.exe runs fine in a
       windows box and doesn't need MS-DOS mode.  I've picked
       it here just because everyone has it and the problem
       is triggered as long as MS-DOS mode is forced.

Observations:
    1) If you initiate pifTest by clicking on it from
       "My Computer" or "Windows Explorer" everthing works
       as expected.
    2) If you open a DOS box (DOS windows) running command.com
       (an icon available off the Start Menu allows doing
       this in a default configuration), and then type the
       command
		start pifTest
       everything works as expected.
    3) If you open a DOS box running Bash (I'm running 2.04
       but don't think there is sensitivity to this) and
       type
		exec start pifTest
       everything works as expected.
    4) If you open a DOS box running Bash and type
		start pifTest
       an error message pops up in a window.  The window
       is titled "Winoldap" (Whatever that is. The name makes
       no sense to me).  The error message begins "This program
       has performed an illegal operation ..."  Clicking
       on a "Details" button gives the register dump.  If you
       just simply hit "Return" to execute the default
       button, which is "Close," everything continues on
       just fine.  So the only real problem is the need to be
       hitting "Return" all the time just to get rid of this
       error message and continue on.

What doesn't work:
       I've tried lots of things to get rid of this problem.
       The fact that prepending "exec" solves the problem
       is probably quite significant.  Unfortunately, I can't
       use that as a solution to the real problem, because
       if the command calling start.exe is within a makefile
       prepending exec no longer helps.  Perhaps the real
       issue is whether or not some parent process is waiting
       around for a return code from some child process.

       Adding "&" to the end of the line with the start.exe
       command doesn't seem to make any difference.

       Enabling the various options available with the
       start.exe command doesn't seem to make any difference.

       Stripping config.sys and autoexec.bat to almost nothing
       doesn't seem to make any difference.

       Occasionally, the error message is not triggered
       even when omitting the "exec" and calling from a
       DOS box running Bash.  This seems to happen right
       after dosTest.pif has been altered in almost any way.

       Until a few months ago I was running Win 95 on a 200
       MHz Pentium Pro.  The problem was not triggered under
       that configuration.  I upgraded the CPU to a 933 MHz PIII
       and the OS to Win 98 simultaneously and can not now go
       back and do just one at a time to see whether the new
       machine or the new OS brought on the problem.

       It would be wonderful is someone could make some
       sense out of all this.  Thanks for any help.
 
-- 
Don Duttweiler
duttweiler AT ieee DOT org

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019