RE: Setting process command name in forked process

2024-01-30 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> that it matters at all, I'd like to +1 the suggestion/request of picking up > support for > setproctitle(3) in the next available release. >> in which case I'd prefer to implement this via setproctitle(3), given >> this API exists on BSD and Linux. Well, I don't think setproctitle(3) exists on

Re: Setting process command name in forked process

2024-01-29 Thread Steve Beck via Cygwin
next available release. Thanks again! Best, Steve From: Corinna Vinschen Sent: Monday, January 29, 2024 1:58 AM To: cygwin@cygwin.com Cc: Steve Beck Subject: Re: Setting process command name in forked process On Jan 26 18:35, Steve Beck via Cygwin wrote: >

RE: Setting process command name in forked process

2024-01-29 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> It used to work in the past, for sure, and was used in some code over here... And yes, like Corinna said, you have to use procps to actually see the changes. Anton Lavrentiev Contractor NIH/NLM/NCBI -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwi

RE: Setting process command name in forked process

2024-01-29 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> Can you see what I'm doing wrong? It used to work in the past, for sure, and was used in some code over here... Since it was an ad-hoc thing, the behavior might have changed -- I haven't checked it lately. To make the full disclosure, we reassign the entire __argv here from the linear memory

Re: Setting process command name in forked process

2024-01-29 Thread Corinna Vinschen via Cygwin
On Jan 26 18:35, Steve Beck via Cygwin wrote: > Thanks so much for the reply, Anton! Really appreciate it. > > I tried what you proposed. Here is the code trying both ways > (overwriting what is referenced by __argv[0] and then reassigning the > reference). I compile this code (foo.c) simply as

Re: Setting process command name in forked process

2024-01-26 Thread Steve Beck via Cygwin
you see what I'm doing wrong? Many thanks, Steve ____ From: Lavrentiev, Anton (NIH/NLM/NCBI) [C] Sent: Friday, January 26, 2024 7:47 AM To: Steve Beck ; cygwin@cygwin.com Subject: RE: Setting process command name in forked process > (I'm assuming it'

RE: Setting process command name in forked process

2024-01-26 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via 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

Re: Setting process command name in forked process

2024-01-24 Thread Brian Inglis via Cygwin
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