duplicated code

Herb Lewis hlewis at panasas.com
Tue Jul 10 17:10:17 MDT 2012

In the file lib/pidfile.c (in both source 3 and source4) the functions 
pidfile_create and
pidfile_pid (which is called by pidfile_create duplicate code that 
begins with the comments

         /* Add a suffix to the program name if this is a process with a
          * none default configuration file name. */

There is also a comment at the beginning of the files that states

/* this code is broken - there is a race condition with the unlink 
(tridge) */

Has anyone looked at this race condition?

More information about the samba-technical mailing list