This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Known Issues: document missing POSIX compliance and other unexpected behaviour

I found no document where missing POSIX functionality is listed
and where other non-POSIX but expected typical UNIX functionality and/or behaviour are different or missing. The user guide is a bit short on that.

This should help UNIX developers and should go the the user guide
(or FAQ?) then.
Unsolved issues (such as some Ghanshyam items) should go to bugzilla then.

I'd like to use a wiki page for that. (bugzilla not applicable)
Which wiki?
I'd suggest
(CygwinIssues page) because this runs on my wiki engine :)

We could also abuse a wikipedia subpage of

Before adding your fixes below in a reply, please please let's talk first where to do that actually. Mailinglist not preferred.

Known Issues:
First see the user-guide
and ff. for the definitive answers.

strictly NON-POSIX:
fopen(): Ghanshyam listed several NON-POSIX issues starting with

TODO: find and document more problems.

Unexpected Behaviour:

filesystem related:
case-insensitive search:
  Windows filesystems are usually case-insensitive in search, but
  case-preservant (I know of 5 windows fs in general use, NTFS5 as
  best, a new one on the horizon). For POSIX compatibility there's no
  optional option or flag to restrict searches
  (open,fopen,readdir,unlink,...) to be case-sensitive.
  You can only tell your filesystem to be case-sensitive (somewhere
  in the registry, which is not recommended and unrealistic), use
  special cygwin managed mounts (mount -o managed) or check
  case-sensitivity explicitly in your code. Best is to avoid such
  issues beforehand, not allowing only case-different filenames.
  But with user-created plugins it will get complicated.

  * unlink isn't atomic (as on other platforms also)
    => while (!unlink(..) or end-of-waiting()) {sleep}
    On cygwin unlink() is deferred to the end of the process,
    when unlink fails because of locks or delete on close
  * unlink a file and subsequent creation of a new file
    in the same loction is not supported.
  * "delete on close" (unlinking an open file) is supported.

passing file descriptors:
  * you cannot pass file descriptors between seperate processes.
    for description and workarounds.
    (There's more. clamav came up with a patch recently, which has
    a good workaround as easy to use code-snippet)

  * hardlinking directories is only available to the superuser
    'ln -d', ...
  * junctions are almost equivalent to symlinks, but symlinks are
    implemented in cygwin differently and slower.
    junctions on filenames do not exists to my knowledge, only
    native hardlinks, which cygwin supports (for filenames at
    least, see above).
    (TODO: native symlinks)

  mounting filesystems and devices are not supported.

device limitations:
  explain about our device mapping, special block/char devices,
  other magic devices like sockets, fifo's, ...

special filenames:
* using (esp. unlinking) "NUL" and other special filenames is
  problematic (see FAQ and windows-special "\\.\" and "\??\" paths).
  "DEL \\.\c:\somedir\nul"

  see user guide <url>
  cygwin ACL's are not 1:1 mapped to windows ACL's,
  esp. for inherited directory permissions. (?)



See,, sysbash,
network shares, samba, windows profiles, ...

 * UNIX root uid is 0, windows SYSTEM uid is 18.
 * cygwin cron usually runs as user SYSTEM and therefore ...
   (network shares, file permissions, ...) TODO
 * TODO: setuid,setgid file permission flag and workarounds.
 * setuid()/setgid() process workarounds.
 * TODO: setsid()/setpgid(): ??
 * TODO: su,sudo vs runas ...
 * TODO: login limitations

See the user-guide on fork, ipc, COFF, ...

see and

Unfortunately cygwin must use seperate PID's than the
underlying windows PID's.

* requires the cygserver daemon
* not fully supported on Win95 yet. TODO

* -lpthread is supported by cygwin1.dll,
  libpthread.a is jut an import library.
* PROCESS_SHARED objects may not work (?, R.Collins, April 2001)
* pshared mutexs (?)
* signals cannot interrupt semaphores: semaphore::_trywait

load average:
* top misses the load average statistics.
  no one came up with a comparable solution yet.
  (how about getrusage(), ...)

See and

* building a .dll requires more steps than building an .so
  google for "Microsoft designers must have been on crack",
  special MSVC-like __declspec EXPORT declarations, ...

  We use specially named import libraries named like
  The shared libs like "cyg<package>-<version>.dll",
  and must reside in the PATH.
* lazy linking is not yet supported.
  see wine and MSVC. (info for windows folks only)
* all exported symbols must be relocatable and known at load-time.
  See gcc -shared, dlltool, dllwrap and libtool.

* bash / rxvt TODO
* pty / tty issues TODO
* pipes
* bash PID reuse problem



-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]