* mdadm/mdmon Name vs argv[0]
@ 2017-05-02 14:19 Jes Sorensen
2017-05-04 13:40 ` Pawel Baldysiak
0 siblings, 1 reply; 3+ messages in thread
From: Jes Sorensen @ 2017-05-02 14:19 UTC (permalink / raw)
To: pawel.baldysiak; +Cc: linux-raid
Hi Pawel,
In the below commit you changed the handling of how mdadm/mdmon handles
printing the name of the running process.
However, if people for some reason decided to change the names of
mdadm/mdmon this would no longer be correct.
Do you remember if there is any reason why you didn't use argv[0] for this?
commit d56dd607ba433d9334f0fb4114fe081742ae4361
Author: Pawel Baldysiak <pawel.baldysiak@intel.com>
Date: Wed Feb 11 22:25:03 2015 +0100
Change way of printing name of a process
Cheers,
Jes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mdadm/mdmon Name vs argv[0]
2017-05-02 14:19 mdadm/mdmon Name vs argv[0] Jes Sorensen
@ 2017-05-04 13:40 ` Pawel Baldysiak
2017-05-04 14:45 ` Jes Sorensen
0 siblings, 1 reply; 3+ messages in thread
From: Pawel Baldysiak @ 2017-05-04 13:40 UTC (permalink / raw)
To: Jes Sorensen; +Cc: linux-raid
On 05/02/2017 04:19 PM, Jes Sorensen wrote:
> Hi Pawel,
>
> In the below commit you changed the handling of how mdadm/mdmon handles
> printing the name of the running process.
>
> However, if people for some reason decided to change the names of
> mdadm/mdmon this would no longer be correct.
>
> Do you remember if there is any reason why you didn't use argv[0] for this?
>
> commit d56dd607ba433d9334f0fb4114fe081742ae4361
> Author: Pawel Baldysiak <pawel.baldysiak@intel.com>
> Date: Wed Feb 11 22:25:03 2015 +0100
>
> Change way of printing name of a process
>
> Cheers,
> Jes
Hi Jes,
We did not consider this option once we were implementing the change.
Also, I was not considering that someone would like to change the
mdadm/mdmon names :)
I see one potential issue with usage of argv[0]:
If you look into mdmon's code (start of the main()),
you will see that first char is replaced with '@'.
Thanks
Pawel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mdadm/mdmon Name vs argv[0]
2017-05-04 13:40 ` Pawel Baldysiak
@ 2017-05-04 14:45 ` Jes Sorensen
0 siblings, 0 replies; 3+ messages in thread
From: Jes Sorensen @ 2017-05-04 14:45 UTC (permalink / raw)
To: Pawel Baldysiak; +Cc: linux-raid
On 05/04/2017 09:40 AM, Pawel Baldysiak wrote:
> On 05/02/2017 04:19 PM, Jes Sorensen wrote:
>> Hi Pawel,
>>
>> In the below commit you changed the handling of how mdadm/mdmon
>> handles printing the name of the running process.
>>
>> However, if people for some reason decided to change the names of
>> mdadm/mdmon this would no longer be correct.
>>
>> Do you remember if there is any reason why you didn't use argv[0] for
>> this?
>>
>> commit d56dd607ba433d9334f0fb4114fe081742ae4361
>> Author: Pawel Baldysiak <pawel.baldysiak@intel.com>
>> Date: Wed Feb 11 22:25:03 2015 +0100
>>
>> Change way of printing name of a process
>>
>> Cheers,
>> Jes
> Hi Jes,
>
> We did not consider this option once we were implementing the change.
> Also, I was not considering that someone would like to change the
> mdadm/mdmon names :)
>
> I see one potential issue with usage of argv[0]:
> If you look into mdmon's code (start of the main()),
> you will see that first char is replaced with '@'.
Good point!
I somehow thought we weren't doing the name mangling anymore.
However we could copy from argv[0] before mangling the name. That way we
would have generic code, rather than hard coded names.
Cheers,
Jes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-04 14:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-02 14:19 mdadm/mdmon Name vs argv[0] Jes Sorensen
2017-05-04 13:40 ` Pawel Baldysiak
2017-05-04 14:45 ` Jes Sorensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).