Subject: simultaneous use of elm and pine?

From: [email-masked] (Douglas Jones)
Date: 18 Jan 1996 12:11:19 -0500

Hi mailers,

	Currently we are using elm on the system and still plan on
	using it in the future. We also want to investigate putting
	pine on the system. The problem that arises is that a person
	can be in both elm and pine at the same time (diff. ttys).
	Under elm, it locks out a second attempt to run it by the
	fact of /tmp/mbox.login existing. Pine appears to give the
	second attempt of pine running read/write over the first
	pine session that is switched to read only. Note that I
	am talking about the system mailbox in all of this. It appears
	that pine determines who has read/write access by creating
	a file on /tmp called something like '.C<something>'. I don't
	really remember for sure, but I noticed that this file was
	777 with a pid number in it. Is this a little security prob.?

	Anyway, I was wondering if any one in these newsgroups had
	a standard way of elm and pine locking each other out. I can
	come up with something, but it would be better to use a
	standard way if that exist. I did not see anything off hand
	in any of the documentation.

	Also, I have not seen it in pine yet, but I was wondering if
	it had an option (compile time) to lock out second pine session.
	Doe pine operate directly on the system mailbox or is it using
	the 'inbox' in the 'mail' directory? Might be nicer if it used
	something on /tmp, since sometimes our user partition is a little
	tight. Maybe this would be a way to have the lock out between pine
	and elm, pine could use /tmp/mbox.login instead of ~/mail/inbox
	(if ~/mail/inbox is what it actually uses).

	Any help would be great. Direct email to [email-masked]
	is the best way. I can post a follow up later on with a
	summary of responses that I get.

Cheers,
Douglas

---

From: Sven Guckes <[email-masked]>
Date: 19 Jan 1996 16:22:45 GMT

[email-masked] (Douglas Jones) writes:
>I was wondering if any one in these newsgroups had a standard way of
>elm and pine locking each other out.

I assume that neither recognizes a lock file of the other
as I have never seen any mention of it before.
However, I think that it would be possible if both used file locking.

>Under elm, it locks out a second attempt to run it by the fact of
>/tmp/mbox.login existing. Pine appears to give the second attempt of pine
>running read/write over the first pine session that is switched to read only.
>Note that I am talking about the system mailbox in all of this.

Well, I'd discourage a lock file in /tmp as this can be local to the host
and thus you can only detect it if the call is made on the same host.

I'd favour a lock file within the user's account (~/.elm or ~/.pine) to make
sure that the lockfile is seen whenever the user is calling the program.

This assumes that the user has a home dir on the machine where he calls
the program.  Is this always true?  Can someone log in on a host where he
has a shell but no a home dir?  Not sure here.

The lockfile should also include the name of the host and the process id.
Obviously, this makes it much easier to find the host and the process id
which makes it easier for sysops to fix problems.

Btw, programs like netscape and nn do just this.

Example:
Starting ELM on host "leibniz" might result in process id "6467" and
ELM would create file "~/.elm/lock.elm.leibniz.6467".

Of course both ELM and PINE would need additional code to recognize these
lock files.  And some code to "ignore that damn lockfile".  :-)