X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6831D3858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1706284121; bh=BG6w0v8edfBPPJNfJz4va1gqTEasmccT4FrNgJtRYGE=; h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=dNvlzCbsL5HqpH94XSvnZzaJ2yfzLhBvopl8kmWv7eYngsxKfWBookFlI5LHX4VAh 7xAVyIvmiHzFQ9tWbjLJt9mcp5rqDaBXSbPFOEI/rs+rgM6C9yD8fwmynKNto53Uwe 2Vbmc6qmej4nR74/SLIBm407GIoAFKagXJ96hBPs= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99DFC3858D39 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 99DFC3858D39 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1706284096; cv=pass; b=eIFh1Z9s9W/1o4gnz+mVAdjtQOaGLaJo0n6R2M0l8b+0CY+joH00e2aQsrhBvc88s6/37/4SIxzRXa74Sw1DMBpTBLEoSkLfm1SvBAO7cNDs9rPTFCHitPvOwNbozW0XyFteEYrHocBnGlQY1+aMYZ/TnTsDV184hDCZ+Ab5+5Q= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1706284096; c=relaxed/simple; bh=sjJBgRK9SyBWqoPwbjso/l6WbyARlH18XG6FRD74DvY=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=DcywG6OrlgwjvD2rYJXLUP7zbZOVZJHJFpUfO/gvoFio2ZpfTbRIwGnL32wh2sLGItNwQ+RoNrboTLpWriYz94qnVX2Wo91yFxz7bfT2epe9+bnypXf+moBxcOpi5q2IRmV0hPrX0kfuPciWQW6LchJMasVmEbxLRU8dPXZ+Hwc= ARC-Authentication-Results: i=2; server2.sourceware.org X-CSE-ConnectionGUID: xlSqE0aCQRyXiPbTsfDIZg== X-CSE-MsgGUID: a6/OY9O9RBuJm4SAyxj4aQ== X-SBRS-Extended: Low X-IronPortListener: ces-out X-IronPort-AV: E=Sophos;i="6.05,216,1701147600"; d="scan'208";a="355342732" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lEJ4ML9euUB+qQ0c2ml+xrUXGd+uGMiwE/s9NQjAQvopzefrfH3l47Zzx177Mj6Z4SF8dlWc40jYu+xlh96UaEDXNxfuc4at8cWTl1fvpTVw77oGOLYy83lsrh19waq5gRRkUQ6S3NTnXuJZgS4qwzUGQAR7jsES5LEIpMT62z+EfLCLezQMotLLKaMflzuu4E+uZojKt+l1otcTa9P26Qk7ajIiURUuwJZIJm/JTAfWHekHjbSubo7V1JUekHr850eJS9k+z7CBgJ8pTaq28GQOXGbjI16fevhcaOkjOv7CealQOkQEEI/DHrkNyNekzCo85bNrCXGRC1raZB7F6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r1rUYHjKyhwoot1FNIiql2eRpqvuCN5fj6DHAeaydg4=; b=SxNvJTkHF5vzVBdwJQS2ov5wRN44zTXdD38ruSc934mVTqFKnwl9+wsgui17qTQRyIDZo0lHiP2YrnVLS80zwRYKL7aJT/7pvpg1P5MGaX0PmucVB9/CcqBucB1DMjZJTqiT+RwZbSvVSSydttQKiAzZCMH6kB7hU6wgyGWlKNvLuGns+5IEZdyvRQXlXp3z/uZctTTn7/vUEavqHADidlqlUD5DX/WfyHF4tQlu7/jhinOzYb/u8PSh5sUi1Ym2bhfgoT8xqQk/LAAPrCq0coylXL/Q7EBEBUJk6ZCVFgak5fe8ZcBlCY2FdSuept19pRoCtTZnufXNBSihJOLCwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ncbi.nlm.nih.gov; dmarc=pass action=none header.from=ncbi.nlm.nih.gov; dkim=pass header.d=ncbi.nlm.nih.gov; arc=none To: Steve Beck , "cygwin AT cygwin DOT com" Subject: RE: Setting process command name in forked process Thread-Topic: Setting process command name in forked process Thread-Index: AQHaTjFJbF93zhLsSUS7kXKt2AFVP7DsPw7g Date: Fri, 26 Jan 2024 15:47:41 +0000 Deferred-Delivery: Fri, 26 Jan 2024 15:47:05 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM8PR09MB7095:EE_|DM8PR09MB6965:EE_ x-ms-office365-filtering-correlation-id: 66801d06-9632-4df7-33ef-08dc1e863340 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: QM4YvWdGuKW88f5CL7xCGR8CrTz+pG9zmJq/e6f8fQDXXLY8ntKWy8hWYkihgOsSOtoZym82Q+YK/hpcLiQNQQXxpIUQyw3uw1VNkdfeEu1TlZYmNzt+cekDIGdktW20EUUfJ3p0PqiF6x/BDeBLm5O7YtNu3L8lTU0hBd//VWMLVzVDd4feU+cFXzlZNMrCiaI0aXssjrdesnwiVEmzw62qKhKyy30ySF8+S9pksYRqhKFBg6M+lZIJ2jRCY7DO+UBtXxtXbSPfiUkmctQWngHgtb2gTezL87/6rYNLbmGqecz3ef5u6MSkQUoZe3jYy5aaEEGb6LW3Yso4irz4R58wIjkBTlbGXifTnAouLr4q9fjmPcT/+PgpVIZLZhxFLjRgTcS87C8gbBLS1FZK3FoQGWH1AYgXbHiTssmxDZYX7MJUVhdE/PBEo9HkaSnI4Oqovf1bdcS7U/ORKeISGqdeNLTa18UdJzyy6zBJB6EzBzPPItW+Tp3A2R7jAghZcaY0Pr2CBqPhY+KzShh/RfJgE1EiFMSpiKL8yMoWWzrS3qo/wQbYQyco18a/DeeX2a3P6QcnzSIT1FunhCiYmVoBNNPXIFktXpuOLxBVNUl9f5CYqeGZ1ufoGmqPNeBd48Rx4ZYetTxuH19Yq69dO4VCzXDFKV2iY05D/57hIGI= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR09MB7095.namprd09.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(230273577357003)(230922051799003)(230173577357003)(186009)(1800799012)(451199024)(8676002)(52536014)(8936002)(4744005)(2906002)(122000001)(71200400001)(38100700002)(7696005)(6506007)(6666004)(9686003)(66946007)(66476007)(76116006)(66446008)(66556008)(55016003)(83380400001)(64756008)(5660300002)(110136005)(86362001)(33656002)(498600001)(26005)(38070700009); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?eJriOST41ITmd1AiCBD04rZV9A8LcO/yen83ZMnEZk8TxW1Lwl92I/iBrE3D?= =?us-ascii?Q?OQ8p3PgqCUsPOZk/PxpjkfXKWIJ9e4pgSQ62qr6YjUo0JU4NtkMh74VHCu3M?= =?us-ascii?Q?HKqw+8Fg7wnVi/SY2gb9TxFxkj5+a1IPgPCPxpdYC4kT5mj0gUc387j/TOQs?= =?us-ascii?Q?Qo8c4+8LEwcnlXBnCqp6ai93l+s2kj0WqdvMOlJa3P106ACfUKfp689xHGK5?= =?us-ascii?Q?sYZgmupdvVET3o/yFhjIJ+kC+YGjueNhKGrklgfFZkILEV8qpTJEQ6jeovPm?= =?us-ascii?Q?vms7sev185NXC0yd1mtaos9R0NTfE8bRjGk9fG7WzteeFaiCtCXt18sqh4cS?= =?us-ascii?Q?4VLfY4kJXDOmvZfBoJKjQt3TRNcxv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d/dIVNm76eFekAKvAM157EKShf4Qwoli5jEPXSO5K7ngfvIwaQTWvj?= =?us-ascii?Q?2otjORYnrvcX1BjTtx9rPCNdfG6jl0FEmZ0df6dPbGrvDHTC6cEnmHQFK7Cv?= =?us-ascii?Q?Pbs98xmKsUyqlD3NXb8yndFzGMpD0sBUTbGgyglwmI/2zIgWssL8ICE9VYnN?= =?us-ascii?Q?f2kNj4oryxwArGjRjip12RTFrg9PFiDaWAT5yEU0+91k481nK0nA/xqXR3IN?= =?us-ascii?Q?mPrePH9F+N6eDocJqroSu2sT0Vsdw+BwMiPH1WVxkzzLBwZ6RlbWHv5Ugh49?= =?us-ascii?Q?R/f0q9RgtZ1Ts4A/kes=3D?= MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: qNQl+kGJN8Qq5z/oEllpbOpyTfiTzUi0UWtcF8xeR1+oH+CBq5Nta9d24DnrRUYnUT2BEgKjNl/KkEiGYsRsubAAFIfZFWLhhaS3S9U+d9BqeVZl02fa6Pyf6b+sW1WUBdV4C8J43DX1lv/whAmMamfpUKg390230Wcukn5uspjTGNY10DmzAYx8OHhYsqA+2GFYZOW3DBfWYPVIq2NkRIwVVdzS/C5PnaN0mHgRtIoVILnKPqJJ9TvSEPyYHaqqM39WiFUGTp/xQ5LJ50h53/MkXiChmy93bNZbVnSJv2/9rzutra7AO2eeY+KSspBRRhkggwsW9F2cXncDJkF37UZFWxeg04YcJX3pjLJWySWXWFbBalVhn4BQaUDZ7LxTUR5i3dpYFzCeLoPpWvLaET0YB2XbtHPKUOZUYykhZuiLcSVY1HxZ4Z6GUVmDjsbSEhHQH0xIBuXwQDinPu2yc3dbSCuy7iu/gctSTRxazibvy8hkFer6T67q7rWiHTuDP92SImUN5Dkh2vDZmBlR6dkfx8RFJm8T2k0H/JCYu1tqm9yc3Rykg9Lsd9m9mW+ZWPE93dFtoE/Cd0L0zGCv4qBD1b9pU6QyjY4rfemCwm1zB2SnRHp2ldfMOwx2Ui1MjY3ObVQzVXl5oJ8zQWlG1et7qVovaEKyiEYOS1poibbhUJAnrX5g6SIesOTsgkej X-OriginatorOrg: ncbi.nlm.nih.gov X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR09MB7095.namprd09.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66801d06-9632-4df7-33ef-08dc1e863340 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jan 2024 15:48:11.3766 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 14b77578-9773-42d5-8507-251ca2dc2b06 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR09MB6965 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, T_SPF_HELO_PERMERROR autolearn=ham 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 AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: "Lavrentiev, Anton \(NIH/NLM/NCBI\) \[C\] via Cygwin" Reply-To: "Lavrentiev, Anton \(NIH/NLM/NCBI\) \[C\]" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" > (I'm assuming it's too late by the time the /proc entry has been set up). Actually, it's not. But beware, the suggested solution is absolutely NOT portable: These are the externals that /proc is referring to... (Not argc, argv passed to main().) extern char** __argv; extern int __argc; So you can change everything that it shows by reassigning __argv(and/or __argc) with a totally different set of arguments, or just modify __argv[0], provided that it fits into the space occupied by the original argument [0]. HTH, Anton Lavrentiev Contractor NIH/NLM/NCBI -- 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