X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 753CB3858434
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1706116198;
	bh=25hUePKskmhHDuq0LYqBDcSxx+FLITOfdXyDN4QNos8=;
	h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=xUmfuqxU1/05Ou6Oh6e9SNEjkjSwmQiH/gSVc88o/kEddcsBPoc8DpXStb/0kdJvs
	 2ewscakxs9WxsuJUhe4z83xX25vPnpEhZuFCFNqtfHpAwsXzep3kIjkSdWZk96ZOs7
	 7VoNFkxC4qpGLuWZM7emLE2ayFetTZyGJdPyEmqY=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 175873858409
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 175873858409
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706116172; cv=none;
 b=SAWfisYGlkvpKVYll7SWF1chB/AxdkeWNxjhJ9iPoD9NTpp6lx27n2JK3+QFNY/w1EqnYcNR4V/0NMbhhhSW0Ba3KDrQGA8ed3YiZxdNSAbmimCzwjKxn/dn6b35uIAl/c5yb88o8auNXzKaE4Bl1Y6p60gug2VIR/nh6WHmnPU=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1706116172; c=relaxed/simple;
 bh=AGVTEc7PBsgoDrA3al7f7vaJczOUs+9FI6VreM5AOOQ=;
 h=Message-ID:Date:MIME-Version:Subject:To:From;
 b=ExeI2tD8imGUqmjMCgmNoiUJLMp075QtJkiDFj16xgLlclq6UOYGBiqugcKMThRJitAyZb1Jlz/m8OP8aaoP/OH0oivE7wO+9EkLQwQes8IsaEIcfyycItdZeFU5Pj7F0crboBQ9ne4MgL7KX3lZyhpQ7SE/aAbZ4ingFHYeEaA=
ARC-Authentication-Results: i=1; server2.sourceware.org
Message-ID: <2f792827-4918-43a9-8f69-9a9f9e8d7556@SystematicSW.ab.ca>
Date: Wed, 24 Jan 2024 10:09:26 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Setting process command name in forked process
Content-Language: en-CA
To: cygwin@cygwin.com
References: <DM6PR20MB34760DA0A9B07EDB6BC5C214B1742@DM6PR20MB3476.namprd20.prod.outlook.com>
Organization: Systematic Software
In-Reply-To: <DM6PR20MB34760DA0A9B07EDB6BC5C214B1742@DM6PR20MB3476.namprd20.prod.outlook.com>
X-Stat-Signature: 7pr7x8npe54upw5j7cdos7ds8kzsfhfr
X-Rspamd-Server: rspamout03
X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
 RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,
 SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE,
 UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6
X-Rspamd-Queue-Id: F076D6000C
X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361
X-Session-ID: U2FsdGVkX19q2MAQv9EOTmaFJ+L6icB5brVsE600mEM=
X-HE-Tag: 1706116166-488593
X-HE-Meta: U2FsdGVkX1800v4iF+h9NFAQsUEneX3jRGPVjIXI+CkzitbQA0JlgTca7ENt84dcmVmRDrukELNegupbRcHJbCRTtAI6qCfPuBy6byAEcHEaC230WoJSH5TIpMZ8jChhuNhwdfxxVUksUx4mVvb+88QnPPstt+yVHvmmoTfq5MntEZbfWabD9WaaoJB/dpmYZKcaakaAzk6Oqk/cNREUkpi4SxMAV/Ahi8ppUTNi7xZrt4nRxoQgEJm0I3XJxIxVxNZ0xaoq6qZPYqzMRbJGzsfCZ0FKmSfMLf+FV9uSQ/mefbclikU+mKmHskgTSjQK
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.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Brian Inglis via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@cygwin.com
Cc: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 40OHA0WE029245

On 2024-01-23 12:32, Steve Beck via Cygwin wrote:
> Hope this is an appropriate question for this list:
> Version 3.4.10 (of cygwin1.dll - cygcheck output attached):
> I am trying to set the process command name of a forked process.  Is there a prescribed way to do this in Cygwin?
> I looked for either prctl(2) from Linux or setproctitle(3) from FreeBSD but they don't link.  I've tried things like overwriting the contents of argv[0], but that didn't work either (I'm assuming it's too late by the time the /proc entry has been set up).

Run/exec/fork/spawn via a symlink with the name you want to see?

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

-- 
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

