Searched defs:pid (Results 1 - 25 of 43) sorted by relevance

12

/lxc/src/lxc/
H A Derror.c42 extern int lxc_error_set_and_log(int pid, int status) argument
49 INFO("Child <%d> ended on error (%d).", pid, ret);
54 INFO("Child <%d> ended on signal (%d).", pid, signal);
H A Dstart.h46 pid_t pid; member in struct:lxc_handler
/lxc/src/tests/
H A Ddestroytest.c34 pid_t pid = fork(); local
36 if (pid < 0) {
40 if (pid == 0) {
47 ret = waitpid(pid, &status, 0);
54 if (ret != pid)
H A Dsaveconfig.c34 pid_t pid = fork(); local
36 if (pid < 0) {
40 if (pid == 0) {
47 ret = waitpid(pid, &status, 0);
54 if (ret != pid)
H A Dstartone.c36 pid_t pid = fork(); local
38 if (pid < 0) {
42 if (pid == 0) {
49 ret = waitpid(pid, &status, 0);
56 if (ret != pid)
68 pid_t pid = fork(); local
70 if (pid < 0) {
74 if (pid == 0) {
81 ret = waitpid(pid, &status, 0);
88 if (ret != pid)
[all...]
H A Dlocktests.c34 pid_t pid; local
41 if ((pid = fork()) < 0)
43 if (pid == 0) {
74 ret = waitpid(pid, &status, WNOHANG);
75 if (ret == pid) { // task exited
77 printf("%d exited normally with exit code %d\n", pid,
82 printf("%d did not exit normally\n", pid);
88 kill(pid, SIGKILL);
H A Dcontainertests.c36 pid_t pid = fork(); local
38 if (pid < 0) {
42 if (pid == 0) {
49 ret = waitpid(pid, &status, 0);
56 if (ret != pid)
68 pid_t pid = fork(); local
70 if (pid < 0) {
74 if (pid == 0) {
81 ret = waitpid(pid, &status, 0);
88 if (ret != pid)
[all...]
H A Daa.c67 pid_t pid; local
80 ret = c->attach(c, test_attach_write_file, fnam, &attach_options, &pid);
97 wait_for_pid(pid);
H A Dattach.c88 pid_t pid; local
103 ret = ct->attach(ct, test_attach_lsm_func_func, NULL, &attach_options, &pid);
124 wait_for_pid(pid);
134 pid_t pid; local
151 ret = ct->attach(ct, lxc_attach_run_command, &command, &attach_options, &pid);
178 wait_for_pid(pid);
199 pid_t pid,nspid; local
217 ret = ct->attach(ct, test_attach_func_func, NULL, &attach_options, &pid);
230 /* There is a small chance the pid is reused inside the NS, so we
233 * if (pid
250 pid_t pid; local
[all...]
/lxc/src/lxc/lsm/
H A Dnop.c27 static char *nop_process_label_get(pid_t pid) argument
H A Dlsm.h35 char *(*process_label_get)(pid_t pid);
44 char *lsm_process_label_get(pid_t pid);
51 static inline char *lsm_process_label_get(pid_t pid) { return NULL; } argument
H A Dlsm.c79 char *lsm_process_label_get(pid_t pid) argument
85 return drv->process_label_get(pid);
H A Dselinux.c41 * @pid : the pid to get, or 0 for self
43 * Returns the context of the given pid. The caller must free()
48 static char *selinux_process_label_get(pid_t pid) argument
53 if (getpidcon_raw(pid, &ctx) < 0) {
54 SYSERROR("failed to get SELinux context for pid %d", pid);
H A Dapparmor.c84 static char *apparmor_process_label_get(pid_t pid) argument
92 ret = snprintf(path, 100, "/proc/%d/attr/current", pid);
/lxc/src/lxc/bdev/
H A Dlxcrsync.c46 pid_t pid; local
50 pid = fork();
51 if (pid < 0)
53 if (pid > 0)
54 return wait_for_pid(pid);
H A Dlxcrbd.c53 pid_t pid; local
85 if ((pid = fork()) < 0)
87 if (!pid) {
91 if (wait_for_pid(pid) < 0)
94 if ((pid = fork()) < 0)
96 if (!pid) {
100 if (wait_for_pid(pid) < 0)
125 pid_t pid; local
129 if ((pid = fork()) < 0)
131 if (!pid) {
[all...]
H A Dlxclvm.c67 int ret, pid, len; local
70 if ((pid = fork()) < 0) {
74 if (pid > 0)
75 return wait_for_pid(pid);
233 int ret, pid; local
236 if ((pid = fork()) < 0) {
240 if (pid > 0)
241 return wait_for_pid(pid);
363 pid_t pid; local
365 if ((pid
[all...]
/lxc/src/lxc/tools/
H A Dlxc_device.c63 static bool is_interface(const char* dev_name, pid_t pid) argument
75 if (!switch_to_ns(pid, "net")) {
H A Dlxc_create.c108 pid_t pid; local
113 pid = fork();
114 if (pid) {
115 wait_for_pid(pid);
H A Dlxc_checkpoint.c166 pid_t pid; local
168 pid = fork();
169 if (pid < 0) {
174 if (pid == 0) {
180 return wait_for_pid(pid) == 0;
H A Dlxc_init.c79 pid_t pid; local
168 pid = fork();
170 if (pid < 0)
173 if (!pid) {
226 kill(pid, was_interrupted);
249 * (not wrapped pid) and continue to wait for
252 if (waited_pid == pid && !have_status) {
H A Dlxc_stop.c103 pid_t pid; local
107 pid = c->init_pid(c);
108 if (pid == -1)
124 if (newpid != -1 && newpid != pid)
148 if (newpid == -1 || newpid == pid) {
H A Dlxc_start.c98 int pid = strtol(lxcname_or_pid, &eptr, 10); local
99 if (*eptr != '\0' || pid < 1) {
103 SYSERROR("'%s' is not a valid pid nor a container name", lxcname_or_pid);
113 pid = s->init_pid(s);
114 if (pid < 1) {
122 if (kill(pid, 0) < 0) {
123 SYSERROR("Can't send signal to pid %d", pid);
127 return pid;
130 static int open_ns(int pid, cons argument
343 int pid = pid_from_lxcname(my_args.share_ns[i], lxcpath); local
[all...]
H A Dlxc_unshare.c161 pid_t pid; local
257 pid = lxc_clone(do_start, &start_arg, flags);
258 if (pid < 0) {
265 if (lxc_netdev_move_by_name(tmpif->mi_ifname, pid, NULL) < 0)
266 fprintf(stderr,"Could not move interface %s into container %d: %s\n", tmpif->mi_ifname, pid, strerror(errno));
273 if (waitpid(pid, &status, 0) < 0) {
274 ERROR("failed to wait for '%d'", pid);
279 exit(lxc_error_set_and_log(pid, status));
/lxc/src/lxc/cgroups/
H A Dcgroup.c97 return ops->enter(handler->cgroup_data, handler->pid);
104 return ops->create_legacy(handler->cgroup_data, handler->pid);
179 bool cgroup_attach(const char *name, const char *lxcpath, pid_t pid) argument
182 return ops->attach(name, lxcpath, pid);

Completed in 30 milliseconds

12