Re: strdup(NULL) supposed to create SIGSEGV?

2008-04-23 Thread Simun Mikecin
>If you're going to quote documents to support your ideas, it's probably >better to read them first. My apologies. My fingers were faster than my mind. But this made me read it the way I should have done in the first place. And I see that it says: "A null pointer is returned if the new string can

Re: strdup(NULL) supposed to create SIGSEGV?

2008-04-23 Thread Simun Mikecin
>Yes, it's supposed to segfault. Check out what, say, strcpy does if >you ask it to copy a NULL pointer. And this is an improvement from the >bad old days, when they would happily walk through memory starting at >0. >Besides, errno is used to signal errors from system calls. strdup >isn't a sys

Re: Filesystem snapshots dog slow

2007-10-16 Thread Simun Mikecin
Jeremy Chadwich wrote: >That said, for such setups, would you recommend *not* using snapshots? >If so, possibly we should consider removing the following code from >src/sbin/dump/main.c: >334 } else if (snapdump == 0) { >335 msg("WARNING: %s\n", >336