MAGIC Magic Mailing List
 
 

From: R. Timothy Edwards (tim AT stravinsky DOT jhuapl.edu)
Date: Fri Aug 24 2001 - 12:50:11 EDT

  • Next message: Prakash: "Re: Magic and file locking"

    Dear Prakash,
    
       The problem comes down to why magic is reporting that
    it cannot find "/flock"; e.g., it appears to be looking for
    it in the system root directory.
    
       I looked through the magic code, and I have found what
    must be the error.  In utils/flock.c, line 148 is
    
        sprintf(lock_buf, "%s/flock", cad_buf);
    
    but should be:
    
        sprintf(lock_buf, "%s/flock", cad_path);
    
    Likewise, line 164 should be changed from 
    
       sprintf(lock_buf, "%s/flock/lock_%u%u", cad_buf,
    
    to
    
       sprintf(lock_buf, "%s/flock/lock_%u%u", cad_path,
    
    Otherwise, if the CAD_HOME environment variable is set, then cad_buf
    remains empty, and the result is that lock_buf becomes "/flock"
    (or worse, since cad_buf was never explicitly initialized).
    
       You can make these changes by hand and recompile.  I will update
    the CVS source distribution with the changes immediately.
    
    							---Tim
    


  •  
     
    Questions? Contact Rajit Manohar
    cornell logo