public inbox for
 help / color / mirror / Atom feed
From: David Taylor <>
Subject: "multiple" users of a SN project & a bug report
Date: Sun, 15 Jul 2001 18:47:00 -0000	[thread overview]
Message-ID: <> (raw)

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

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"


. 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

Take care,

David Taylor

             reply	other threads:[~2001-07-15 18:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-15 18:47 David Taylor [this message]
2001-07-16 11:04 ` Mo DeJong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).