Bug 000026

When Created: 09/24/1995 05:19:53
Against DJGPP version: 2.00.beta3
By whom:
Abstract: system()/spawnXX()/execXX() don't update filesystem
When invoking other programs with any function from the system() or
spawnXX()/execXX() family, the files which stay open in the parent aren't
updated on disk.  Thus, if the child reads the same file, it could get
stale data.  While most applications will call fflush() in this situation,
this was found not enough in DJGPP.  A call to DOS CommitFile function is
required to update the filesystem in this case.

Solution added: 09/24/1995 05:23:51
By whom:
In the file src/libc/dos/process/dosexec.c, add a call to sync() at the
beginning of direct_exec_tail() function.  For compatibility with ANSI/POSIX,
sync should be called __sync() and an appropriate alias added to the
<libc/stubs.h> header file, and likewise for fsync() which sync() calls.

Fixed in version 2.00.beta4 on 11/12/1995 18:35:37
By whom:

  webmaster     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010