~kampka/ubuntu/quantal/lxc/upstart-instance

« back to all changes in this revision

Viewing changes to src/lxc/cgroup.c

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber, Serge Hallyn, Stéphane Graber
  • Date: 2012-08-25 12:44:17 UTC
  • Revision ID: package-import@ubuntu.com-20120825124417-yn1xu1x10fi7o972
Tags: 0.8.0~rc1-4ubuntu29
[ Serge Hallyn ]
* fix lxcapi_start to not return true when it container failed to start.
* 0201-fix-mkdir-race: don't raise error if mkdir fails with EEXIST.
* 0202-make-api-start-reliable: have daemonized start through the api
  wait until the container is RUNNING before returning true.  If a 5
  second timeout is hit before the container is RUNNING, return false.

[ Stéphane Graber ]
* python-lxc: in get_ips() if timeout is 1 don't wait one second before
  returning.
* python-lxc: Add import time warning that the API isn't yet stable and
  so may change at any point in the future.

Show diffs side-by-side

added added

removed removed

Lines of Context:
357
357
        }
358
358
 
359
359
        /* if /sys/fs/cgroup/<cgroup>/<init-cgroup>/lxc does not exist, create it */
360
 
        if (access(cgparent, F_OK) && mkdir(cgparent, 0755)) {
361
 
                SYSERROR("failed to create '%s' directory", cgparent);
362
 
                return -1;
 
360
        if (access(cgparent, F_OK)) {
 
361
                ret = mkdir(cgparent, 0755);
 
362
                if (ret == -1 && errno == EEXIST) {
 
363
                        SYSERROR("failed to create '%s' directory", cgparent);
 
364
                        return -1;
 
365
                }
363
366
        }
364
367
 
365
368
        /*