Searching how to replace dosfilewarning functionality

Denis Excoffier
Wed Jan 29 22:49:00 GMT 2020


I see ( that the Cygwin code that handles the dos_file_warning option will be removed soon.

I use this option. I don’t use it directly (for DOS paths) but as a signal to be sure that no Cygwin process remains present on my system. This is useful
in some cases (re-reading /etc/passwd, /etc/nsswitch.conf occurs only for the first process) but also mainly to make sure that if my PC uses memory or CPU at 100%,
Cygwin is not the culprit (since no Cygwin process remains loaded). I don’t use cygrunsrv or equivalent.

I do this:
1) I replace "bool dos_file_warning;"  with "bool dos_file_warning = true;", and recompile cygwin1.dll. This has to be done at a regular basis, at each new version or snapshot.
2) In my .cshrc i install "echo \\ /nonexistent*" (or something more clever, like "echo \\ /nonexistent* |& head --lines=-6").
3) When I login, if I see "Cygwin WARNING:", this means that apart from the current process, there is no other Cygwin process in my system. An important feature is that the "Cygwin WARNING" message never appears afterwards (in subsequent shells, like in xterm’s).
4) If I exit from a shell that has displayed "Cygwin WARNING:", I’m sure that no Cygwin process remains (I know that my .cshrc is clean about process creation etc.).

Is there any alternative to this almost-functionality if this code is removed?


Denis Excoffier.

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list