[15179] in Athena Bugs
sun4 8.0K: send_message
daemon@ATHENA.MIT.EDU (mhpower@MIT.EDU)
Sat Jun 7 23:09:24 1997
From: mhpower@MIT.EDU
To: bugs@MIT.EDU, dot@MIT.EDU
Date: Sat, 07 Jun 1997 23:09:20 EDT
System name: portnoy
Type and version: SPARC/5 8.0K (1 update(s) to same version)
Display type: cgthree
What were you trying to do?
Run netscape on a machine on which my home directory was
not attached. This is intentional. Usually I create a
local home directory before running netscape, but this
time I thought I'd try avoiding that step.
What's wrong:
It started a process
send_message ns9608 /mit/infoagents/share/Netscape/v3.0/ns9608
that appeared to stay running for an indeterminately long time.
After a minute or two, it printed out
Removed lockfile //.sw_messages.lck
but it continued running for a long time after this was printed.
No netscape windows were ever created.
What should have happened:
Ideally it should have told me that my home directory was not
attached and asked whether I'd like to run netscape anyway.
Less ideally, but still better than the current behavior,
it would promptly print a failure message stating that my
home directory did not exist, and it was therefore
completely unable to proceed.
Please describe any relevant documentation references:
I think it may be running this code in
/mit/swtools/src/lockfile.c:
while (
(file1 = open(filename, O_RDWR | O_CREAT | O_EXCL,
S_IRWXU | S_IRGRP | S_IROTH)) == FAILURE)
{
if ((errno == ENOSPC) || (errno == EDQUOT))
return FAILURE;
sleeptime = (rand()%4) + 1;
sleep(sleeptime);
if (count == 10)
{
fprintf(stderr, "Removed lockfile %s\n", filename);
unlink(filename);
}
count++;
}
I don't understand why it wants to retry, at all, if the error is
ENOENT. Also, I don't understand why there is no way to ever break out
of the while loop if the open error continues to be ENOENT.