delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/09/14/09:21:40

Message-Id: <m11QsTw-0006OPC@galjas.cs.vu.nl>
Date: Tue, 14 Sep 99 15:18:48 MET DST
From: Michel de Ruiter <mdruiter AT cs DOT vu DOT nl>
To: djgpp-workers AT delorie DOT com
cc: dj AT delorie DOT com
Subject: Chmod bug
Reply-To: djgpp-workers AT delorie DOT com

Dear workers,

I have found a very strange problem in DOS. MS-DOS 7.10 without Win98
GUI. It also happens in a DOS-box under Win98. You can experience it
as follows:

%DJDIR%\bin\echo.exe xmsxxxx0mytext

This locks up DOS. I think this concerns two problems:

- One minor one, the fact that arguments are globbed even when they do
  not contain special characters. This should be easy to fix.

- One concerning the filename xmsxxxx0mytext, where mytext may be
  whatever you want, but at least 1 character.

The problem is in _chmod:
__crt0_glob_function -> glob -> glob2 -> __file_exists -> _chmod ->
__dpmi_int

The following is a minimal snippet that shows the exact behaviour:

#include <libc/dosio.h>
#include <go32.h>
#include <dpmi.h>

int main(void)
{
  __dpmi_regs r;

  r.x.ax = 0x4300;
  _put_path("xmsxxxx0mytext");
  r.x.dx = __tb_offset;
  r.x.ds = __tb_segment;
  __dpmi_int(0x21, &r);

  return 0;
}

I do not know of a simple workaround. Anyone?

Groente, Michel.

PS: I think any mail from @delorie.com to @cs.vu.nl is bounced (I do
not receive djgpp-workers any more nor answer from DJ about that), so
please reply to my other address, michel AT smr DOT nl. Maybe I should have
posted this instead.

- Raw text -


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