From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by sourceware.org (Postfix) with ESMTPS id E23E63858C20 for ; Mon, 22 Aug 2022 16:35:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E23E63858C20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.ru Received: from forward100q.mail.yandex.net (forward100q.mail.yandex.net [IPv6:2a02:6b8:c0e:4b:0:640:4012:bb97]) by forward106p.mail.yandex.net (Yandex) with ESMTP id B13332FC0D29 for ; Mon, 22 Aug 2022 19:35:00 +0300 (MSK) Received: from vla3-23c3b031fed5.qloud-c.yandex.net (vla3-23c3b031fed5.qloud-c.yandex.net [IPv6:2a02:6b8:c15:2582:0:640:23c3:b031]) by forward100q.mail.yandex.net (Yandex) with ESMTP id ACC5F6F40002 for ; Mon, 22 Aug 2022 19:35:00 +0300 (MSK) Received: by vla3-23c3b031fed5.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id vZP1B6zgPD-Z0ieik9S; Mon, 22 Aug 2022 19:35:00 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1661186100; bh=YtMd5Ykk81PplDxJY10fXcdcaIBWlI2j2DtEcIfCU7I=; h=Subject:To:Message-ID:Reply-To:Date:From; b=bGNpX6RnNtc47ZYV9H4VLlnpKRJ9la9TLYkrtQYwK7255fpGA281RGzw63hv3OgXS A5cBVGDvllsWZPTEqhuq2UodDIvTk3M5iTJ0vjJ+fQORfCV9+RCmVV3H7/ZPfOTWjv mGUqc6XJg3OGJmzoQJlw097iWHpyq0+pPQZBrBTM= Authentication-Results: vla3-23c3b031fed5.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Mon, 22 Aug 2022 16:22:19 -0000 Date: Mon, 22 Aug 2022 19:22:19 +0300 From: Andrey Repin X-Mailer: The Bat! (v9.3.4) Professional Reply-To: cygwin@cygwin.com Message-ID: <1277628349.20220822192219@yandex.ru> To: All Subject: Find out a process that holding the socket? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2022 16:35:06 -0000 Greetings, All! I'm trying to write a small helper utility, and I need to find out, which process is holding a particular socket open. Since there's no "lsof" utility in Cygwin, which is commonly suggested for this task on Linux, I'm failing to find an alternative. Is there a simple solution available or I have to dig down into WinAPI? The process is going to run elevated, if that matters. -- With best regards, Andrey Repin Monday, August 22, 2022 19:15:48 Sorry for my terrible english...