KnownIssues for Cygwin

Experimental blackboard to get it into the official docs then. Only a few hardcore developers will be able to verify these issues.

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 official cygwin user guide (or FAQ?) then. Unsolved issues (such as some Ghanshyam items) should go to bugzilla then.

Please fix add or fix as approriate.

Known Issues

First see the user-guide http://cygwin.com/cygwin-ug-net/highlights.html and http://cygwin.com/cygwin-ug-net/using.html ff. for the definitive answers. But some of these answers are known and verified to be outdated.


Strictly NON-POSIX

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

http://www.cygwin.com/ml/cygwin/2004-03/msg00357.html

Note on "fopen is successful even if search permission is denied": this isn't a Cygwin issue. Windows disables access checks for directory traversal by default, by granting and enabling the SeChangeNotifyPrivilege privilege for all users. Revoke this privilege to your user or group if this is a problem. Update: Since 1.3.14 cygwin honors directory traversal security as in POSIX. Turn it off via CYGWIN=notraversal to get back the Windows behaviour not to check all upper dirs for proper perms.

sysconf()
http://www.cygwin.com/ml/cygwin/2004-03/msg01193.html
strftime()
http://www.cygwin.com/ml/cygwin/2004-03/msg01192.html
sigaction()
http://www.cygwin.com/ml/cygwin/2004-03/msg01194.html
struct lconv *localeconv
http://www.cygwin.com/ml/cygwin/2004-10/msg01164.html
clock_getres() missing though _POSIX_TIMERS is defined
http://cygwin.com/ml/cygwin/2005-04/msg00336.html
symlink(2) is not atomic
http://sourceware.org/ml/cygwin/2005-03/msg01024.html

TODO: find and document more problems.


Unexpected Behaviour

Filesystem Related

unlink()

Passing file descriptors

Hardlinks

mount

Mounting filesystems and devices are not supported.
The /usr/bin/mount syntax is similar but different to your favorite mount. See mount -m.

/etc/mtab is not linked to /proc/mounts. /proc/mount is not yet implemented, but a few other procfs files are: $ ls /proc <cyg-pids/...> cpuinfo meminfo registry/ uptime loadavg partitions stat version

Device limitations TODO

Explain about our device mapping, special block/char devices, other magic devices like sockets, fifo's, ...
/dev/dsp and other audio devices do work.
Serial devices have some known limitations.
Igor's /usr/sbin/create_devices.sh helper (ml-url?)

Special filenames

See http://cygwin.com/cygwin-ug-net/using-specialnames.html

getfacl/setfacl

See user guide ( http://www.cygwin.com/cygwin-ug-net/using-utils.html : setfacl / getfacl )
cygwin ACL's are not 1:1 mapped to windows ACL's, esp. for inherited directory permissions. (?)
TODO

(definitive answer: => corrinna)

select()

sync()

Security

See http://cygwin.com/cygwin-ug-net/ntsec.html, http://cygwin.com/faq/faq_3.html#SEC78, sysbash, network shares, samba, windows profiles, ...
Of course cygwin is entirely insecure.

setuid/su/login/cron

Processes

See the user-guide on fork, IPC, ...
(definitive answers: => cgf)

fork

Works as expected.
See http://cygwin.com/faq/faq_3.html#SEC74 and http://cygwin.com/cygwin-ug-net/highlights.html#OV-HI-PROCESS

PID

IPC

Threads

1.5.11 was rather unstable compared to 1.5.10.

  • -lpthread is supported by cygwin1.dll, libpthread.a is just an import library.
  • PROCESS_SHARED objects may not work (?, R.Collins, April 2001)
  • pshared mutexs (?)
  • signals cannot interrupt semaphores: semaphore::_trywait
  • as always: The latest snapshot might have fixed it :)

DLL

See http://cygwin.com/cygwin-ug-net/dll.html and http://cygwin.com/faq/faq_3.html#SEC108
Use gcc -shared or libtool, or the older helpers dlltool, dllwrap.

getloadavg() missing

Console

/bin/sh really is ash (a smaller bourne shell). On linux it's usually /bin/bash. There are subtle syntax differences.

Other magic good to know