www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/05/22/15:01:33

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 54MJ1Wwd377411
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 54MJ1Wwd377411
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=AAUH6Xwn
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C36F385743A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1747940492;
bh=xmI41fRjOacJgXkV73S/HAL63c70gTWpk6EMHP7UJdc=;
h=Date:Subject:To:References:Cc:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=AAUH6Xwn0u2cm6zpq1WobrT/2JKYRpRawsp07ojgPsJMZzcksCUL6JzSdLxhV/SrC
j6rYM+wkSho/6DZCHOljG8trLcVdrl57rFZl3dFxU/CMCNks1E4/i4gA7aPafmuFNO
wW0mPgJegoL/3xypGXJU0hSnhDFeZteXQoIDH3Ug=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0BDEB3857B9E
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0BDEB3857B9E
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1747940431; cv=none;
b=WL/WnGMiloes6eOhwclFpot+94q1hma3Kb+DVDulQrt9hqak5vftfR8cx4J1DDVELa/ferw0mYpiV3HEVpQIAo3NAm36+o9tOV8bFYaEn32Y4M0jYfpR8uqz+mOuUoTaPXyrjPhXaaIsIpBLlaqvweUV7NmGeVr9z3FeepgzAIU=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1747940431; c=relaxed/simple;
bh=ha1uoCUOEOvt9Cla/Ap3j6TEr9yjj8LmsjNTqkfGe5U=;
h=Message-ID:Date:MIME-Version:Subject:To:From;
b=YQXOawlgnVVAnS9+OInT9GM/oHZwipy9QjG7RxqLYmNFdgafT3iCDITkMfl5xwF5aOAsum/miYGnrMzJOsZUzBqeWC1enchPRkxN900wsczi+vcs/qo77eEV7XKxIijnFJnmFPPFBQg2adMjR74leGneqyH1cCyHpx+X98xrqsU=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0BDEB3857B9E
X-SNCR-Rigid: 67D89D1C0760FF29
X-Originating-IP: [81.129.146.154]
X-OWM-Source-IP: 81.129.146.154
X-OWM-Env-Sender: jon DOT turney AT dronecode DOT org DOT uk
X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgdeijeehucdltddurdegfedvrddttddmucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfevjggtgfesthejredttddvjeenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepvedvkefgffetteeuhefgudeggfekveeljeduudehveeutdevjeefvedvvedvgfdvnecukfhppeekuddruddvledrudegiedrudehgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddtlegnpdhinhgvthepkedurdduvdelrddugeeirdduheegpdhmrghilhhfrhhomhepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhdprhgvvhfkrfephhhoshhtkeduqdduvdelqddugeeiqdduheegrdhrrghnghgvkeduqdduvdelrdgsthgtvghnthhrrghlphhluhhsrdgtohhmpdgruhhthhgpuhhsvghrpehjohhnthhurhhnvgihsegsthhinhhtvghrnhgvthdrtghomhdpghgvohfkrfepifeupdfovfetjfhoshhtpegsthhprhgurhhgohdttdeipdhnsggprhgtphhtthhopedvpdhrtghpthhtohepvehhrhhi
shhtihgrnhdrnfhuphhivghnsegfufhhvghrsghrohhokhgvrdgtrgdprhgtphhtthhopegthihgfihinhestgihghifihhnrdgtohhm
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
X-VadeSecure-score: verdict=clean score=0/300, class=clean
Message-ID: <7529e53c-67e2-46c3-8a2d-1d1bcacc36d0@dronecode.org.uk>
Date: Thu, 22 May 2025 20:00:26 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug with cygserver-config not working anymore
To: Christian Lupien <Christian DOT Lupien AT USherbrooke DOT ca>
References: <861a1fac721ae16816bcfaf275494a3b6b3321bf DOT camel AT USherbrooke DOT ca>
<20250502201631 DOT 64564fc27c27bbdcc3d83aab AT nifty DOT ne DOT jp>
Cc: cygwin AT cygwin DOT com
In-Reply-To: <20250502201631.64564fc27c27bbdcc3d83aab@nifty.ne.jp>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Jon Turney via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

On 02/05/2025 12:16, Takashi Yano via Cygwin wrote:
> On Wed, 30 Apr 2025 21:30:16 +0000
> Christian Lupien wrote:
>> On a recent system install, I tried to install cygserver by executing
>>   cygserver-config
>> but it failed saying that cygserver was already running.
>>
>> I have done that same install for many years with success.
>>
>> I tracked down the problem to the service discovery line inside the
>> script (line 92) that uses:
>>   ps -ef | grep -v grep | grep -q ${service_name}
>> but since ps -f was changed in commit (2024-01-31)
>> 1ce9756ee61e8dff5e3319851e14ebf310a0bdd8 to return the cmdline which it
>> did not before, this fails because the script finds itself (cygserver-
>> config is found by grep -q ${service_name})
>>
>> I think the solution would be to remove the -f option to ps. So a patch
>> would be like:
>> --- cygserver-config.orig	2025-04-30 17:23:24.461779400 -0400
>> +++ cygserver-config	2025-04-30 17:23:47.067576200 -0400
>> @@ -89,7 +89,7 @@
>>   _nt=`expr "${_sys}" : "CYGWIN_NT"`
>>   
>>   # Check for running cygserver processes first.
>> -if ps -ef | grep -v grep | grep -q ${service_name}
>> +if ps -e | grep -v grep | grep -q ${service_name}
>>   then
>>     echo
>>     echo "There is a cygserver (${service_name}) already running. Nothing to do, apparently."
> 
> Thanks for the report and patch snippet. I'll push the fix.

Ah! That's why that's suddenly started happening.

Thanks very much for tracking this down and providing the patch!


I think that Brian is also perhaps correct that the output of 'cygrunsrv 
-Q' is probably what we really should be looking at.

(Examining cygserver-config, I doubt that it's ever worked correctly 
when a non-default service name is provided using the -N option, since 
we're grepping for a process with that name, which will never exist!)


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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