On 06/02/11 18:40, Goswin von Brederlow wrote:
I absolutely hate that. A header file should be compilable on its
own. The times when #includefoo.h would slow down the compiler are
long gone and all include files are protected with #ifndef NAME so
duplicate includes are harmless.
On the other
Shachar Shemesh shac...@debian.org writes:
On 26/01/11 13:03, Goswin von Brederlow wrote:
Some things I noticed:
safewrite.h:
- missing headers, e.g. for mode_t
No. That's intentional. I'm assuming the people who will use
safewrite.h are going to RTFM, where it clearly says that those
On 26/01/11 13:03, Goswin von Brederlow wrote:
Some things I noticed:
safewrite.h:
- missing headers, e.g. for mode_t
No. That's intentional. I'm assuming the people who will use safewrite.h
are going to RTFM, where it clearly says that those includes are needed.
I might reconsider if
On Fri, Jan 28, 2011 at 07:37:02AM +0100, Olaf van der Spek wrote:
Is there a way to log cases where (potentially) unsafe writes happen?
Cases like truncation of an existing file, rename on a target that's
not yet synced, etc.
Not really, because there are plenty of cases where it's
On Sat, Jan 29, 2011 at 1:53 PM, Ted Ts'o ty...@mit.edu wrote:
On Fri, Jan 28, 2011 at 07:37:02AM +0100, Olaf van der Spek wrote:
Is there a way to log cases where (potentially) unsafe writes happen?
Cases like truncation of an existing file, rename on a target that's
not yet synced, etc.
Hendrik Sattler p...@hendrik-sattler.de writes:
char buffer[0]; is veeery gcc-specific as the storage size of buffer
is 0. According to the C99 standard:
6.7.5.2 Array declarators
Constraints
1 In addition to optional type qualifiers and the keyword static, the [ and
] may delimit an
On Friday 28 January 2011 03:26:42 Ted Ts'o wrote:
On Wed, Jan 26, 2011 at 06:14:42PM +0100, Olaf van der Spek wrote:
On Wed, Jan 26, 2011 at 5:36 PM, Hendrik Sattler
p...@hendrik-sattler.de wrote:
BTW: KDE4 is a very good example for failure with modern filesystems. I
regularly
On 2011-01-26 17:36:19 +0100, Hendrik Sattler wrote:
Zitat von Goswin von Brederlow goswin-...@web.de:
Hendrik Sattler p...@hendrik-sattler.de writes:
Zitat von Goswin von Brederlow goswin-...@web.de:
typedef struct {
int fd;
char buffer[0];
} safe_t;
and allocating
On Wed, Jan 26, 2011 at 06:14:42PM +0100, Olaf van der Spek wrote:
On Wed, Jan 26, 2011 at 5:36 PM, Hendrik Sattler
p...@hendrik-sattler.de wrote:
BTW: KDE4 is a very good example for failure with modern filesystems. I
regularly loose configuration files when suspend-to-ram fails even if the
On Fri, Jan 28, 2011 at 3:26 AM, Ted Ts'o ty...@mit.edu wrote:
On Wed, Jan 26, 2011 at 06:14:42PM +0100, Olaf van der Spek wrote:
On Wed, Jan 26, 2011 at 5:36 PM, Hendrik Sattler
p...@hendrik-sattler.de wrote:
BTW: KDE4 is a very good example for failure with modern filesystems. I
regularly
Ian Jackson ijack...@chiark.greenend.org.uk writes:
Shachar Shemesh writes (Re: Safe file update library ready (sort of)):
I'm sorry, it might be me, but I fail to see the overlap between the
functionalities of safewrite vs. userv. The premises for safewrite is
that a program wants to make
Shachar Shemesh shac...@debian.org writes:
Hi all,
I've promised to get a library out there, and here it is. The base URL
is https://github.com/Shachar/safewrite, and the actual code is at
https://github.com/Shachar/safewrite/blob/master/safewrite.c
This is not a formal release just yet
On Wed, Jan 26, 2011 at 12:03:52PM +0100, Goswin von Brederlow wrote:
Shachar Shemesh shac...@debian.org writes:
I've promised to get a library out there, and here it is. The base URL
is https://github.com/Shachar/safewrite, and the actual code is at
On Wed, Jan 26, 2011 at 12:22 PM, Adam Borowski kilob...@angband.pl wrote:
typedef struct {
int fd;
char buffer[PATH_MAX];
} safe_t;
Except, you can't rely on PATH_MAX on any modern system. It's defined in
Linux headers to an arbitrary value to make old code compile, but
On Wed, Jan 26, 2011 at 11:36 AM, Goswin von Brederlow
goswin-...@web.de wrote:
I think you are dead wrong there Ian. Even if every single program is
dead right (and we know a lot aren't) that means every one of them has
a safe file update function somewhere in it.
A function doing exactly
Adam Borowski kilob...@angband.pl writes:
On Wed, Jan 26, 2011 at 12:03:52PM +0100, Goswin von Brederlow wrote:
Shachar Shemesh shac...@debian.org writes:
I've promised to get a library out there, and here it is. The base URL
is https://github.com/Shachar/safewrite, and the actual code is
Zitat von Goswin von Brederlow goswin-...@web.de:
Adam Borowski kilob...@angband.pl writes:
On Wed, Jan 26, 2011 at 12:03:52PM +0100, Goswin von Brederlow wrote:
Shachar Shemesh shac...@debian.org writes:
I've promised to get a library out there, and here it is. The base URL
is
Hendrik Sattler p...@hendrik-sattler.de writes:
Zitat von Goswin von Brederlow goswin-...@web.de:
Adam Borowski kilob...@angband.pl writes:
On Wed, Jan 26, 2011 at 12:03:52PM +0100, Goswin von Brederlow wrote:
Shachar Shemesh shac...@debian.org writes:
I've promised to get a library out
On Wed, Jan 26, 2011 at 5:09 PM, Goswin von Brederlow goswin-...@web.de wrote:
typedef struct {
int fd;
char buffer[];
} safe_t;
or what do you mean by invalid C?
Zero length arrays are not valid C AFAIK.
--
Olaf
--
To UNSUBSCRIBE, email to
Zitat von Goswin von Brederlow goswin-...@web.de:
Hendrik Sattler p...@hendrik-sattler.de writes:
Zitat von Goswin von Brederlow goswin-...@web.de:
Adam Borowski kilob...@angband.pl writes:
On Wed, Jan 26, 2011 at 12:03:52PM +0100, Goswin von Brederlow wrote:
Shachar Shemesh
On Wed, Jan 26, 2011 at 5:36 PM, Hendrik Sattler
p...@hendrik-sattler.de wrote:
BTW: KDE4 is a very good example for failure with modern filesystems. I
regularly loose configuration files when suspend-to-ram fails even if the
configuration of the running programs were not changed. Yay :-( And
Zitat von Olaf van der Spek olafvds...@gmail.com:
On Wed, Jan 26, 2011 at 5:36 PM, Hendrik Sattler
p...@hendrik-sattler.de wrote:
BTW: KDE4 is a very good example for failure with modern filesystems. I
regularly loose configuration files when suspend-to-ram fails even if the
configuration of
On Wed, Jan 26, 2011 at 7:25 PM, Hendrik Sattler
p...@hendrik-sattler.de wrote:
Zitat von Olaf van der Spek olafvds...@gmail.com:
On Wed, Jan 26, 2011 at 5:36 PM, Hendrik Sattler
p...@hendrik-sattler.de wrote:
BTW: KDE4 is a very good example for failure with modern filesystems. I
regularly
On 04/01/11 16:24, Ian Jackson wrote:
Shachar Shemesh writes (Safe file update library ready (sort of)):
This is not a formal release just yet (plus one function is still
missing an implementation, trivial though it might be). It's just that
the list obviously has a few people knowledgeable
Shachar Shemesh writes (Safe file update library ready (sort of)):
This is not a formal release just yet (plus one function is still
missing an implementation, trivial though it might be). It's just that
the list obviously has a few people knowledgeable on the subject who can
give my code a
Shachar Shemesh writes (Re: Safe file update library ready (sort of)):
I'm sorry, it might be me, but I fail to see the overlap between the
functionalities of safewrite vs. userv. The premises for safewrite is
that a program wants to make sure data integrity is maintained when
writing files
On Tue, Jan 4, 2011 at 7:19 PM, Ian Jackson
ijack...@chiark.greenend.org.uk wrote:
Having said that, I don't think the concept behind your library is
sound, because it presupposes that all previous programs which update
files are buggy.
They are. Kinda. They either do unsafe file updates or
On Mon, Jan 03, 2011 at 12:43:24PM +0200, Shachar Shemesh wrote:
Hi all,
I've promised to get a library out there, and here it is. The base
URL is https://github.com/Shachar/safewrite, and the actual code is
at https://github.com/Shachar/safewrite/blob/master/safewrite.c
[...]
Give my code
On 03/01/11 14:10, Adam Borowski wrote:
There's a race condition:
while [ 1 ]; do ln -s /etc/passwd somefile.tmp; done
Hey root, could you please use this program using libsafewrite on
'somefile'?
Two questions:
1. Is this race a regression from the single file case?
2. Is this race
On 03/01/11 14:10, Adam Borowski wrote:
There's a race condition:
while [ 1 ]; do ln -s /etc/passwd somefile.tmp; done
Hey root, could you please use this program using libsafewrite on
'somefile'?
Two questions:
1. Is this race a regression from the single file case?
2. Is this race
Hi
Dne Mon, 03 Jan 2011 15:56:44 +0200
Shachar Shemesh shac...@debian.org napsal(a):
In essence, it is impossible, as far as I know (patches welcome) to
avoid a race when symlinks are involved (with specific exceptions). The
assumption is, and has always been, that the directory resides
31 matches
Mail list logo