delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/01/30/02:21:04

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=ugfeChxdf2x2okf6
hbM8OQ+mDsIRPrD6bHFmv3VcLEslm8SedmoFT1aktnEDQe0nRsza+aCgNVOVTVSJ
AeA/WbqIGDVUmbrfk57mezy+xGh+gz10eE/LM+pSCUwWAnPWnC2CrKgB67EzGqK4
4tXk72lcWXvZwDk2hYh3+HxobBY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=n5ba4BOrZSZpHfZ9+gnJVM
nYESE=; b=kRn0TLIYRbssn0dQB6uaH/KWM9Qa95lhFFh4jF+CL0HmmmjZbRQg/X
cM4QT/RWWjAJ5DawRbqzSrBA+ltSadNZNo4tyD3aKGEuR/ybDcaFQH5BYvefQdIP
x3wO8rH6JPVk59CMFuD+T6sKpPdGI7B3xjpnJXi8YSI4Sl9nzrUq4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.1 spammy=H*r:smtp, H*UA:Bat!, H*M:yandex, Searching
X-HELO: forward106j.mail.yandex.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1580368803; bh=KpZAwfw8JEOM60JUHMU/bNBi8rrSvj68kjTZl3+rrlo=; h=In-Reply-To:Subject:To:Reply-To:From:Message-ID:References:Date; b=IAAOIrm1XvOnafqGCb7zwpy/9NFSvasjt/XtVzKVXWawLAM/ON+oDrkyaYHNejqHH DIYNQqHTmn4KcPwyRkV1E10cyNf1m+jBMZNtJwJ4u2lC+e/Qhfproy+ABRsJIhW5UF AOae6BMaOfkw+hFP+amXf9n9HgTpecQlTFcMooLo=
Authentication-Results: mxback2q.mail.yandex.net; dkim=pass header.i=@yandex.ru
Date: Thu, 30 Jan 2020 10:06:21 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <1069298224.20200130100621@yandex.ru>
To: Denis Excoffier <cygwin AT Denis-Excoffier DOT org>, cygwin AT cygwin DOT com
Subject: Re: Searching how to replace dosfilewarning functionality
In-Reply-To: <87A8C69F-2350-4945-981A-2CD2F38E9F5F@Denis-Excoffier.org>
References: <87A8C69F-2350-4945-981A-2CD2F38E9F5F AT Denis-Excoffier DOT org>
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 00U7Keuc019155

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019