linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jes Sorensen <jes.sorensen@gmail.com>
To: Pawel Baldysiak <pawel.baldysiak@intel.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: mdadm/mdmon Name vs argv[0]
Date: Thu, 4 May 2017 10:45:56 -0400	[thread overview]
Message-ID: <f40434ba-5963-71b9-38e3-67f5b93a056f@gmail.com> (raw)
In-Reply-To: <3f64ba3e-e931-6055-8621-a91c637e0174@intel.com>

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



      reply	other threads:[~2017-05-04 14:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f40434ba-5963-71b9-38e3-67f5b93a056f@gmail.com \
    --to=jes.sorensen@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=pawel.baldysiak@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).