public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
From: John Charlton <j.d.charlton@ieee.org>
To: Bart Oldeman <bartoldeman@users.sourceforge.net>
Cc: linux-msdos@vger.kernel.org
Subject: Re: file lock() and share.exe
Date: Sat, 20 Sep 2003 18:51:32 -0400	[thread overview]
Message-ID: <200309201851.32807.j.d.charlton@ieee.org> (raw)
In-Reply-To: <200309120942.26678.j.d.charlton@ieee.org>

On Friday 12 September 2003 09:42, John Charlton wrote:
> On Friday 12 September 2003 06:21, Bart Oldeman wrote:
> > On Thu, 11 Sep 2003, John Charlton wrote:
> > > I have a dos application compiled with djgpp compiler in dosemu.  A
> > > call to the lock() function which works in native freedos (beta 8)
> > > always returns -1 (failed) in dosemu.  I first used dosemu 1.0.2.0
> > > which installs with SuSE Linux 8.2 distribution.  I just installed
> > > dosemu-1.1.5 and observe the exact same behavior.  The freedos version
> > > used with dosemu-1.1.5 is:
> > > FreeDOS kernel version 1.1.24c (Build 2024c) [Jun 10 2001 22:25:01]
> >
> > you'll need to upgrade your freedos kernel. Replace your kernel.sys with
> > v. 2031 at http://freedos.sourceforge.net (fat16/32 doesn't matter).
> >
> > Beware of "unzip" and uppercase: use "unzip -L" otherwise you end up with
> > KERNEL.SYS and kernel.sys.
> >
> > share.exe has absolutely no effect on the "network drives" (from
> > lredir) that DOSEMU uses by default.
> >
> > Bart
>
> Thank you.  This definitely does the trick!  Works as advertised.  No
> share.exe loaded the lock works.
>
> --John

I now have dosemu 1.1.5.0 with kernel v. 2031 fat 16 as recommended above.  It 
fixes the lock() problem I was having including file lock() on an Iredir NFS 
mounted file system.  After some testing, I have found a problem with this 
kernel (2031) which occurs both on native freedos boot or using dosemu 
1.1.5.0.  The problem occurs using stdin input and fgets() calls.  They work 
one or two times then return junk without waiting for an endline enter 
sequence.  Here is the function that returns without waiting for the keyboard 
enter/end of line:

void chkkbd(void)
{
  int ch;
  char str[80];
  
  fprintf(stderr, "Hit enter to continue, s to stop, q to quit 
immediately...");
  fgets(str, 80, stdin);
  fputs(str, stderr);
  ch = str[0];
  if (ch == 's' || ch == 'S') {
    bStop = TRUE;
  }
  if (ch == 'q' || ch == 'Q') {
    bQuit = TRUE;
  }
}

It is a pretty basic function.  I did use getchar() at first, with the same 
result.  This function works as intended with kernel 1.1.26a (2026a) or in 
linux.  With kernel 2031 it behaves as described above and if you rerun the 
same program it crashes the dosemu session.

Is there an earlier kernel I can use to solve the share/lock issue and not 
introduce this stdin problem?

--John


  reply	other threads:[~2003-09-20 22:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-12  1:43 file lock() and share.exe John Charlton
2003-09-12 10:21 ` Bart Oldeman
2003-09-12 13:42   ` John Charlton
2003-09-20 22:51     ` John Charlton [this message]
2003-09-21  0:14       ` Bart Oldeman
2003-09-21 16:10         ` John Charlton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200309201851.32807.j.d.charlton@ieee.org \
    --to=j.d.charlton@ieee.org \
    --cc=bartoldeman@users.sourceforge.net \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox