~ubuntu-branches/ubuntu/quantal/lxc/quantal-201208301614

« back to all changes in this revision

Viewing changes to src/lxc/mainloop.c

  • Committer: Bazaar Package Importer
  • Author(s): Guido Trotter
  • Date: 2010-06-28 10:15:48 UTC
  • mto: (1.1.4 upstream) (3.1.5 sid)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20100628101548-vexhggdo6x9cpwtk
ImportĀ upstreamĀ versionĀ 0.7.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <string.h>
25
25
#include <stdlib.h>
26
26
#include <errno.h>
 
27
#include <fcntl.h>
27
28
#include <unistd.h>
28
29
#include <sys/epoll.h>
29
30
 
132
133
        if (descr->epfd < 0)
133
134
                return -1;
134
135
 
 
136
        if (fcntl(descr->epfd, F_SETFD, FD_CLOEXEC)) {
 
137
                close(descr->epfd);
 
138
                return -1;
 
139
        }
 
140
 
135
141
        lxc_list_init(&descr->handlers);
136
142
        return 0;
137
143
}