Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#970 closed Defect (fixed)

ERR_ALREADY_RUNNING is misleading if it's just a file permission problem

Reported by: Eric Myers Owned by: davea
Priority: Minor Milestone: Undetermined
Component: Client - Daemon Version: 6.10.17
Keywords: Cc:

Description

The way the client determines whether another instance of itself is running is to try to open a lock file (via get_client_mutex() in lib/util.cpp). But this will fail not only if there is another client already running, but in the simpler case that the lock file cannot be created/written due to bad file permissions. It would be helpful to first test the file permissions and throw an error warning of that problem before checking the lock file itself.

For discussion and background see this thread: http://boinc.berkeley.edu/dev/forum_thread.php?id=4532 He figured it out, but it would have been easier with an explicit message pointing to a file permission problem.

Change History (4)

comment:1 Changed 14 years ago by davea

Resolution: fixed
Status: newclosed

(In [20051]) - client: Unix: if can't create client lock file,

report ERR_OPEN rather than ERR_ALREADY_RUNNING fixes #970

comment:2 Changed 14 years ago by Nicolas

Why not check errno to know why the client can't create lock file?

comment:3 Changed 14 years ago by Eric Myers

Will this now give ERR_OPEN when in fact the problem is that another instance of the client daemon is running (the purpose of the lock file in the first place)?

comment:4 Changed 14 years ago by romw

(In [20163]) - client: Unix: if can't create client lock file,

report ERR_OPEN rather than ERR_ALREADY_RUNNING fixes #970

lib/

util.cpp filesys.cpp

Note: See TracTickets for help on using tickets.