From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id EC1373858D32 for ; Tue, 23 Aug 2022 16:09:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EC1373858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=berkeley.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=berkeley.edu Received: by mail-oi1-x229.google.com with SMTP id t140so7708800oie.8 for ; Tue, 23 Aug 2022 09:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=berkeley.edu; s=google; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc; bh=k/92gEB0v2d7CqQhjJ28BIZBQGPgoc24pFT4KQN44AY=; b=mti9/yigTW26zg6ngm0pNlfW52PUAjqigTo2l3cmvfMQjh4oVplkLFpRsmOHn2+29C 6UhETGXHs0FSJE8m50/rETFKVRGF0cNkI8R9FbfDJVEauEZNBs4SYyHzsTTpq68C1PIh O/SqgPJFduhnvB6l6NaAYdgUVARsF2pWZrMLWaUfTwz8BzreiukQV9U/hpzfSkpApdUh a6arEmy0/NWWTn2HzCMk+wv8yc6511ywUHwp2LfAXevrI7vKawdVWRmfSBQsFRjL/3NX iXZfgt0gTZ6bZkzwMJRepCatWD2xRWpV4xk1rUFWhwA8lL1WRciQXss6QX+G54GiSHWV qHvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc; bh=k/92gEB0v2d7CqQhjJ28BIZBQGPgoc24pFT4KQN44AY=; b=GlELNWk3Lni/cjFPkfNBXZApWaHHBzy5df+xqEKKMnRB3zsbuWZGOXqxxikCxBIH5S a1JDvlUN/xosf3oSUAZ9zCdsiXLhgDnHuP8cvi0a93+yQ1rDN8vEYCSyZJr95eOO4tuB Xx/x/G+b1XywjDExul6ugzMUIJpaJtcQNe1KuJ5W/omWa7WijPm1l83gKUmtx22RT9Mz kRAepnjbkFm5C5CJq3LwHWnkeIuZGp9yFDLbkaB6bLulFCkJNDFuOTmYq50xL3xXRGdt BUFeJCq8QfL7F4yfArFtb0hYv6WL3FJPB0ueh9qg+4dqynX5QZeX5+AB+C1PBv2WsTlQ MNfg== X-Gm-Message-State: ACgBeo1ti4cWfBy5SdM9iDxeQeeQ4+8eY2Lzgxk9tKKSf9nAffdd338R 0dbo8utvKI4QmXyIz7lGTLTo7zFiFLrcW7Fp5KUyG38XgpkNYg== X-Google-Smtp-Source: AA6agR5w+6YbpmDLR70ZVYLfLxhoXzwOiZ22OkTFo+BbPz4zoF7yoKirrUTXHtCn2fPX6ArWAwph4nYUvwB3zLHz7KI= X-Received: by 2002:a05:6808:148e:b0:343:77fc:b7d2 with SMTP id e14-20020a056808148e00b0034377fcb7d2mr1535722oiw.128.1661270943753; Tue, 23 Aug 2022 09:09:03 -0700 (PDT) MIME-Version: 1.0 References: <1277628349.20220822192219@yandex.ru> In-Reply-To: <1277628349.20220822192219@yandex.ru> From: "Stephen P. Carrier" Date: Tue, 23 Aug 2022 09:08:52 -0700 Message-ID: Subject: Re: Find out a process that holding the socket? To: cygwin@cygwin.com X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 23 Aug 2022 16:09:09 -0000 The 'handle' utility from Sysinternals should be able to help. http://technet.microsoft.com/en-us/sysinternals/bb842062 --Stephen Carrier BEAR Center On Mon, Aug 22, 2022 at 9:35 AM Andrey Repin wrote: > 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... > > > -- > 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 >