9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] lucio-
@ 2002-01-09  5:08 Russ Cox
  2002-01-09  5:32 ` Lucio De Re
  0 siblings, 1 reply; 7+ messages in thread
From: Russ Cox @ 2002-01-09  5:08 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]

> No offense meant, but doesn't this show precisely what CVS's strength
> is?  Had you recorded the fix, we wouldn't be still looking for it :-)

It shows that I should keep better
records of what I do each day.

Even if I had the CVS source under
CVS, I probably would have thrown out
the repository when I ported the new one.
Further, I'm not sure whether the bug was
in CVS or in APE.

If I remembered what was broken,
I could run history to find it.

Case in point: I just found it, by
poking around for files in /sys/src/ape
modified about the same date as when I
ported the new CVS (which I remember being
near when I found the bug).

CVS wouldn't have helped any more than the
dump here.

The bug is in /sys/src/ape/lib/ap/plan9/getcwd.c.
Replace the entire file with:

#include "lib.h"
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include "sys9.h"
#include "dir.h"

char*
getcwd(char *buf, size_t len)
{
	int fd;

	fd = _OPEN(".", OREAD);
	if(fd < 0) {
		errno = EACCES;
		return 0;
	}
	if(_FD2PATH(fd, buf, len) < 0) {
		errno = EIO;
		_CLOSE(fd);
		return 0;
	}
	_CLOSE(fd);

	return buf;
}

Exercise to the reader: find the fd leak in the
original.

Russ

[-- Attachment #2: Type: message/rfc822, Size: 2436 bytes --]

From: Lucio De Re <lucio@proxima.alt.za>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] lucio-
Date: Wed, 9 Jan 2002 06:52:59 +0200
Message-ID: <20020109065259.G12098@cackle.proxima.alt.za>

On Tue, Jan 08, 2002 at 10:06:45PM -0500, Russ Cox wrote:
>
> For the list, I've fixed this bug before.
> I remember it being a neat bug, but I don't
> remember what it was.  Once Lucio and I figure
> it out again, one of us will post what the
> problem was.  Perhaps it was cvs, perhaps APE,
> perhaps some weird interaction between the
> two.  I've been trying to remember all day.
>
No offense meant, but doesn't this show precisely what CVS's strength
is?  Had you recorded the fix, we wouldn't be still looking for it :-)

But I agree wholeheartedly that CVS is only a partial solution and
that the needs it attempts to address vary widely.  I'm tempted to
create a mailing list specially to discuss a CVS-like development
that merges the Plan 9 backup technology into it.  Any takers?

++L

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Source version control (Was: [9fans] lucio-)
@ 2002-01-10 12:18 Fco.J.Ballesteros
  0 siblings, 0 replies; 7+ messages in thread
From: Fco.J.Ballesteros @ 2002-01-10 12:18 UTC (permalink / raw)
  To: 9fans

Why don't you just change the implementation of the file server
to accept a remote 'dump name' command to cause an immediate dump at root
/n/dump/name/ ?
Of course this would need to implement something like a /ctl file
on the file server to accept innocent-looking(?) commands from other machines.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-03-04 21:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-09  5:08 [9fans] lucio- Russ Cox
2002-01-09  5:32 ` Lucio De Re
2002-01-09  6:01   ` Lucio De Re
2002-01-10 10:37   ` Bruce Janson
2002-01-10 12:07     ` Source version control (Was: [9fans] lucio-) Lucio De Re
2002-03-04 21:14     ` [9fans] lucio- Richard Uhtenwoldt
2002-01-10 12:18 Source version control (Was: [9fans] lucio-) Fco.J.Ballesteros

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 NNTP newsgroup(s).