This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Searching how to replace dosfilewarning functionality
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Denis Excoffier <cygwin at Denis-Excoffier dot org>, cygwin at cygwin dot com
- Date: Thu, 30 Jan 2020 10:06:21 +0300
- Subject: Re: Searching how to replace dosfilewarning functionality
- References: <87A8C69F-2350-4945-981A-2CD2F38E9F5F@Denis-Excoffier.org>
- Reply-to: cygwin at cygwin dot com
Greetings, Denis Excoffier!
> 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?
I fail to see why you want to do such mental gymnastics.
Just create a script like
test $( ps -al | grep -vE "\<${TTY##/dev/}\>" |& wc -l ) -gt 1 && {
echo There\'s likely other processes running from Cygwin environment.
echo Please stop them or use --force to suppress this test.
exit 1
}
and run it whenever you suspect Cygwin tasks running in background.
[C:\arc\cygwin\install]$ install-cygwin.sh
PID PPID PGID WINPID TTY UID STIME COMMAND
1563 1 1563 187240 ? 18 Jan 29 /usr/bin/cygrunsrv
1562 1 1562 187172 ? 197608 Jan 29 /usr/bin/ssh-pageant
1564 1563 1564 190868 ? 18 Jan 29 /usr/sbin/cygserver
There's likely other processes running from Cygwin environment.
Please stop them or use --force to suppress this test.
--
With best regards,
Andrey Repin
Thursday, January 30, 2020 10:03:02
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple