There is a bug out there for using NTEmacs on Windows. NTEmacs on Windows is great setup to use in combination with cygwin. However since quite some time when you launch cygwin as a shell from NTEmacs it give this error. There is a bug out there for using NTEmacs on Windows. Its been several years and no one has been able to solve it yet. Please look through this and solve it so that cygwin could be used as a shell from with in NTEmacs.