pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/45775



The following reply was made to PR pkg/45775; it has been noted by GNATS.

From: Nat Sloss <nathanialsloss%yahoo.com.au@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/45775
Date: Mon, 23 Jan 2012 17:45:32 +1100

 Hi,
 
 With the following patches LPRng uses lpd.pid:
 
 --- src/common/checkpc.c.orig   2004-09-24 20:19:57.000000000 +0000
 +++ src/common/checkpc.c
 @@ -188,7 +188,7 @@ int main( int argc, char *argv[], char *
         } else {
                 int oldfile = Spool_file_perms_DYN;
                 Spool_file_perms_DYN = 0644;
 -               path = safestrdup3( Lockfile_DYN,".", Lpd_port_DYN, __FILE__, 
 __
 LINE__ );
 +               path = safestrdup2( Lockfile_DYN,".pid", __FILE__, __LINE__ );
                 if(Verbose)MESSAGE( "LPD lockfile '%s'", path );
                 if( path[0] != '/' ){
                         WARNMSG( "Warning: LPD lockfile '%s' not absolute 
 path",
  path );
 --- src/common/child.c.orig     2004-09-24 20:19:57.000000000 +0000
 +++ src/common/child.c
 @@ -261,7 +261,7 @@ plp_signal_t cleanup (int passed_signal)
                 Sigstr(passed_signal), Errorcode );
  #if defined(__CYGWIN__)
         if( getpid() == Server_pid ) {
 -               char *path = safestrdup3( Lockfile_DYN,".", Lpd_port_DYN, 
 __FILE
 __, __LINE__ );
 +               char *path = safestrdup2( Lockfile_DYN,".pid", __FILE__, 
 __LINE_
 _ );
          unlink(path);
                 if( path ) free(path); path = 0;
         }
 
 --- src/common/lpd.c.orig       2004-09-24 20:19:58.000000000 +0000
 +++ src/common/lpd.c
 @@ -772,7 +772,7 @@ int Get_lpd_pid(void)
         char *path;
         struct stat statb;
 
 -       path = safestrdup3( Lockfile_DYN,".", Lpd_port_DYN, __FILE__, 
 __LINE__ )
 ;
 +       path = safestrdup2( Lockfile_DYN,".pid", __FILE__, __LINE__ );
         pid = -1;
         lockfd = Checkread( path, &statb );
         if( lockfd >= 0 ){
 @@ -800,7 +800,7 @@ int Lock_lpd_pid(void)
         struct stat statb;
         int euid = geteuid();
 
 -       path = safestrdup3( Lockfile_DYN,".", Lpd_port_DYN, __FILE__, 
 __LINE__ )
 ;
 +       path = safestrdup2( Lockfile_DYN,".pid", __FILE__, __LINE__ );
         To_euid_root();
         lockfd = Checkwrite( path, &statb, O_RDWR, 1, 0 );
         if( lockfd < 0 ){
 
 I hope this helps.
 
 Regards,
 
 Nat.
 


Home | Main Index | Thread Index | Old Index