delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/11/02/04:05:26

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 349073851C3A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1604307887;
bh=OYnDBAZB+/WVGhRJoaaZRXW7+Xp+uEZ407jPZTpgHvI=;
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=gD0U7k31/8n3toMco2pT3EFRGFR8FMh2SymX6i8CELH5lk4pqnOBZKEDi9UR4j0Ks
YlDoENXqofUHBOIG3Chm2240CgsRLuQ5PbW9A7IIHLovDPJisjI9dR5YM3Rh0eTV4M
9TZ01aJzHNonOh3Qwsx/9RZHMDmchaDXQuz4qS0o=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A238A3858002
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=G7aIqNiai1dm3u6a+n/OGLc8uT04xY9FoAjwgEWEWtY=;
b=YdCwj00b61kx2wFkIyr7ul1iV8RYEVn+EJgV9e9jD9QnrAvOYEGO/OLRnAfzWTp5zD
fiXoSAkN5ekgtdkqSEGYDenJ9MDez+Zjj72sQybTFud1GNyEy3kIYlD5N3aveKD4EjGG
K+SDP9lIVjheNoHv0cpCl8yUpDtJ8mFGOehQ7etxtAebHMkXxnJHM/gN6tfUzUwK4fTS
l4SFQIVF2tswtebsWGpLRqgJS4R8ZroAfrCj3+/AJltCBQyRbeaJbtW0tPEEA5cQ3+xn
Y2scYgeqkYTz/G9Nqdf4+wDacScx0GwD2M0r0ls+R0KtQdPB03TpIQRGh+9h4UZLNpEf
/Lng==
X-Gm-Message-State: AOAM5321On7Ifx8HoO7hXtthlkngUeXiV+1zoRIWl+6tfIB0EueMdDtz
8ci9CmsqDXMw0n6FBf/rVwq8hRiwyEmHUZjUAlUbgFBgstKAgA==
X-Google-Smtp-Source: ABdhPJyHuxSEDQi0IbHS7S4dK8llqi1C/DQVJaDH4NAu8dCuvOm2cC51S8v3BXqFP7GZrF82Dt42ffp8D6JMsARDnrM=
X-Received: by 2002:aca:aa90:: with SMTP id t138mr4782867oie.171.1604307883947;
Mon, 02 Nov 2020 01:04:43 -0800 (PST)
MIME-Version: 1.0
References: <CAFNJpngLavJyvY2krD+iO+fVffhKXy5xbpEBtruMgWdhbm3A-g AT mail DOT gmail DOT com>
<1642805098 DOT 20201102093638 AT yandex DOT ru>
In-Reply-To: <1642805098.20201102093638@yandex.ru>
Date: Mon, 2 Nov 2020 11:04:33 +0200
Message-ID: <CAFNJpni0BPrbWunFC0S14v0sns+EfbM4Ne7AB=ikr1gc6x7LHw@mail.gmail.com>
Subject: Re: procmon doesn't capture cygwin's process arguments
To: cygwin AT cygwin DOT com
X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
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: Oleksandr Gavenko via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Oleksandr Gavenko <gavenkoa AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

Andrey Repin wrote:
> > * https://cygwin.com/cygwin-ug-net/using-cygwinenv.html
> Yes, it's in CYGWIN=wincmdln

Thx. So I was tired enough not to spot that option even when there is
a keyword "argv" on the page ((

> But it's not necessarily accurate.
> See the documentation for details.

Docs said:

(no)wincmdln - if set, the windows complete command line (truncated to ~32K)
will be passed on any processes that it creates in addition to the
normal UNIX argv list.
Defaults to not set.

So the presentation is not accurate if the length exceeds 32K. NP ))

At least I am not blind at what happens with processes. Tested, it works:

CYGWIN=wincmdln emacs-w32 -Q

The first process doesn't report its argv, but all children do.

The solution of Brian Inglis (of using "ps" or "/proc/*/cmdline") is
not viable in situations when
processes start and die quickly.

I need some tracer, "strace" crashed Emacs & procmon has nice UI.

Tnx!


On Mon, Nov 2, 2020 at 8:50 AM Andrey Repin <anrdaemon AT yandex DOT ru> wrote:
>
> Greetings, Oleksandr Gavenko!
>
> > I tried to find out what processes emacs-w32 is starting for my custom
> > TRAMP method.
>
> > "strace -f emacs-w32" fails.
>
> > I expected to succeed with procmon & its filter " Command/ Process Start".
>
> > Unfortunately procmon [1] doesn't report "argv" if a Cygwin executable is
> > started from a Cygwin executable. If I run a Cygwin app from the Windows
> > environment it captures positional arguments.
>
> > Is there some option to make positional arguments visible to procmon?
>
> > I could find it in:
>
> > * https://cygwin.com/cygwin-ug-net/using-cygwinenv.html
>
> Yes, it's in CYGWIN=wincmdln
> But it's not necessarily accurate.
> See the documentation for details.
>
> > * https://cygwin.com/cygwin-ug-net/setup-env.html
>
> > Please keep my email in CC...
>
> > [1] https://docs.microsoft.com/en-us/sysinternals/downloads/procmon
>
>
> --
> With best regards,
> Andrey Repin
> Monday, November 2, 2020 9:35:15
>
> 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

- Raw text -


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