Print

Print


URL:
  <http://savannah.cern.ch/bugs/?80905>

                 Summary: xrootd cmd name (argv[0]) changes on Linux if
.postfix is used for executable name
                 Project: XROOTD
            Submitted by: wilko
            Submitted on: 2011-04-12 20:03
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: abh
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
      Fixed by commit(s): 

    _______________________________________________________

Details:

Hello 

If the binary name of the xrootd or the cmsd are using a .postfix extension
the command name seen by ps has the dot replaced by a space. For example:
 % xrootd.test -c .... 
  would show up in ps as:
 % ps -ef | grep xrootd 
   xrootd test -c .....

The origin of the problem is in XrdConfig.cc (for xrootd):

  if (dotrim && *dfltProt != '.' )
      {char *p = dfltProt;
       while (*p && *p != '.') p++;
       if (*p == '.') *p = '\0';
      }
   Firstcp = Lastcp = new XrdConfigProt(strdup(dfltProt), 0, 0);

dfltProt points to the file basename in argv[0] and in the if statement the
dot after xrootd gets replaced with a space. Looks like on Linux argv is
global and used by the kernel to determine the program name. 
As mentioned this happens for the xrootd and cmsd. 
On Solaris this does not happen.

Cheers,
  Wilko 





    _______________________________________________________

Reply to this item at:

  <http://savannah.cern.ch/bugs/?80905>

_______________________________________________
  Message sent via/by LCG Savannah
  http://savannah.cern.ch/