[6415] in SIPB bug reports

home help back first fref pref prev next nref lref last post

Re: ncftp

daemon@ATHENA.MIT.EDU (Greg Hudson)
Mon Jun 30 12:51:25 1997

To: ccount@MIT.EDU
Cc: bug-sipb@MIT.EDU
In-Reply-To: Your message of "Mon, 30 Jun 1997 12:42:40 EDT."
             <9706301642.AA04674@indium.MIT.EDU> 
Date: Mon, 30 Jun 1997 12:50:52 EDT
From: Greg Hudson <ghudson@MIT.EDU>

(I don't know anything about problem 2.)

> 12:31 afs: byte-range lock/unlock ignored; make sure no one else is running this program.

This is a combination of mild ncftp lossage and irritating AFS
lossage.  ncftp locks only the first byte of its lock file, for no
particular reason, and AFS only does locks on entire files.  The
following patch should suppress the warning message (which I believe
only shows up on Suns):

*** Main.c.old	Mon Jun 30 12:47:45 1997
--- Main.c	Mon Jun 30 12:47:56 1997
***************
*** 487,493 ****
  	l.l_type = F_WRLCK;
  	l.l_start = 0;
  	l.l_whence = SEEK_SET;
! 	l.l_len = 1;
  
  	OurDirectoryPath(gLockFileName, sizeof(gLockFileName), kLockFileName);
  	if ((fd = open(gLockFileName, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR)) < 0) {
--- 487,493 ----
  	l.l_type = F_WRLCK;
  	l.l_start = 0;
  	l.l_whence = SEEK_SET;
! 	l.l_len = 0;
  
  	OurDirectoryPath(gLockFileName, sizeof(gLockFileName), kLockFileName);
  	if ((fd = open(gLockFileName, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR)) < 0) {

home help back first fref pref prev next nref lref last post