* "multiple" users of a SN project & a bug report
@ 2001-07-15 18:47 David Taylor
2001-07-16 11:04 ` Mo DeJong
0 siblings, 1 reply; 2+ messages in thread
From: David Taylor @ 2001-07-15 18:47 UTC (permalink / raw)
To: sourcenav
From looking at the code and reading some of the archives of this
mailing list, I conclude that it isn't intended for a SN project to be
allowed to be open in two or more processes simultaneously -- which is
a real shame!
For instance, I'd like to be able to
. bring up SN at work
. open a project
. go home (without closing the project)
. login to work from home
. bring up SN from home
. open the project that I have open at work
Having the second one say "it's already open for modification, you
have to open it read-only", might not be too bad. Right now though it
totally refuses to open it.
[At least in SN 5.0; I tried the snapshot dated April 12th, but it
failed to build for me on Red Hat Linux 6.2.]
NOTE: there *IS* a bug in the function sn_is_project_busy
(snavigator/gui/misc.tcl).
Assuming we are on unix, ignore the issue of root opening the project,
and we have a real project, the remaining logic in sn_is_project_busy
reduces to roughly:
. open the project read-only; get list of users; close the project
. if no one is using the project, return ""
. if the project user is on the same machine, then
. if the pid matches our's, return "me"
. if the platform is "unix"
. if the process no longer exists OR is owned by someone else,
then return "" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< BUG
(you fail to distinguish between failure due to the process
not existing [ESRCH] versus you don't have permission to send
the signal to that process [EPERM].)
. else ...
. if project user matches current user, return "me"
. return "busy"
So,
. if two users, same or different, on different machines try to open
the same project, the second one will fail
. if the same user, tries to open the same project twice on the same
machine, the second attempt will fail
. if different users try to open the same project on the same machine,
the second one will succeed!
[Additionally, there appears to be a race condition present -- two
processes could open the project read-only, check whether there are
current users, see that there are none, and go ahead and re-open
it...]
Take care,
David
--
David Taylor
taylor@candd.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: "multiple" users of a SN project & a bug report
2001-07-15 18:47 "multiple" users of a SN project & a bug report David Taylor
@ 2001-07-16 11:04 ` Mo DeJong
0 siblings, 0 replies; 2+ messages in thread
From: Mo DeJong @ 2001-07-16 11:04 UTC (permalink / raw)
To: sourcenav
On Sun, 15 Jul 2001, David Taylor wrote:
> From looking at the code and reading some of the archives of this
> mailing list, I conclude that it isn't intended for a SN project to be
> allowed to be open in two or more processes simultaneously -- which is
> a real shame!
That is correct. There is no multi-user support in the SN database
layer. The old version tried to add "quick and dirty" support
for a db copy in the contention case, but that code was removed
in 5.0.
> Having the second one say "it's already open for modification, you
> have to open it read-only", might not be too bad. Right now though it
> totally refuses to open it.
You can't open things read only. Stuff like grep history will stop
working. There is more to it than just symbol lookups.
> NOTE: there *IS* a bug in the function sn_is_project_busy
> (snavigator/gui/misc.tcl).
Could you add a bug report (PR) for this?
Go to:
http://sources.redhat.com/sourcenav/
Then click on "Bug Reporting".
Cheers
Mo DeJong
Red Hat Inc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-07-16 11:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-15 18:47 "multiple" users of a SN project & a bug report David Taylor
2001-07-16 11:04 ` Mo DeJong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).