[lxc-devel] strdup return value

Andrian Nord nightnord at gmail.com
Wed Nov 18 19:16:45 UTC 2009


On Wed, Nov 18, 2009 at 11:54:16AM +0300, Michael Tokarev wrote:
>     if (!dest) {
>        SYSERROR("failed to allocate memory");
>        abort();
>     }
>     return dest;
>   }
> 
> as used in countless other projects all around the world.

And we will need some kind of static storage for open descriptors to be
closed on abort? And we will need semaphores, locks and other 'nice'
things to be sure, that liblxc whould be usable in threaded environment?

Or we should just drop open descriptions leaving buffered messages to be
lost forever (probably, there would be last log messages)? Or probably
call sync to have massive i/o slowdown on every i/o write operation, if
there is active file server on host?

Is it worth it?




More information about the lxc-devel mailing list