/lxc/src/lxc/ |
H A D | error.h | 26 extern int lxc_error_set_and_log(int pid, int status);
|
H A D | error.c | 42 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 D | network.h | 34 extern int lxc_netdev_move_by_index(int ifindex, pid_t pid, const char* ifname); 35 extern int lxc_netdev_move_by_name(const char *ifname, pid_t pid, const char* newname);
|
/lxc/src/lxc/bdev/ |
H A D | lxcrbd.c | 53 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 D | lxczfs.c | 126 pid_t pid; local 147 if ((pid = fork()) < 0) 149 if (!pid) { 157 return wait_for_pid(pid); 171 if ((pid = fork()) < 0) 173 if (!pid) { 181 (void) wait_for_pid(pid); 184 if ((pid = fork()) < 0) 186 if (!pid) { 190 if (wait_for_pid(pid) < 240 pid_t pid; local 269 pid_t pid; local [all...] |
H A D | lxcrsync.c | 46 pid_t pid; local 50 pid = fork(); 51 if (pid < 0) 53 if (pid > 0) 54 return wait_for_pid(pid);
|
H A D | lxcnbd.c | 174 pid_t pid; local 201 pid = fork(); 202 if (pid) { 238 pid_t pid; local 244 pid = lxc_clone(do_attach_nbd, &data, CLONE_NEWPID); 245 if (pid < 0) 255 ret = snprintf(path, 100, "/sys/block/nbd%d/pid", idx); 264 pid_t pid = fork(); local 266 if (pid < 0) { 270 if (pid) { [all...] |
H A D | lxclvm.c | 67 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/lsm/ |
H A D | lsm.h | 35 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 D | selinux.c | 41 * @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 D | nop.c | 27 static char *nop_process_label_get(pid_t pid) argument
|
H A D | lsm.c | 79 char *lsm_process_label_get(pid_t pid) argument 85 return drv->process_label_get(pid);
|
/lxc/src/tests/ |
H A D | lxc-test-automount | 58 pid=`lxc-info -n lxc-test-automount -p -H` 59 cg=`awk -F: '/freezer/ { print $3 }' /proc/$pid/cgroup` 61 stat /proc/$pid/root/sys/fs/cgroup/freezer || notfound=1 78 pid=`lxc-info -n lxc-test-automount -p -H` 80 stat /proc/$pid/root/sys/fs/cgroup/freezer || notfound=1 83 stat /proc/$pid/root/sys/fs/cgroup/freezer/cgroup.procs || notfound=1 86 mkdir /proc/$pid/root/sys/fs/cgroup/freezer/xx || ro=1 89 mkdir /proc/$pid/root/sys/fs/cgroup/freezer/$cg/xx || ro=1 92 stat /proc/$pid/root/sys/fs/cgroup/freezer/$cg/cgroup.procs || notfound=1 101 pid [all...] |
H A D | destroytest.c | 34 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 D | locktests.c | 34 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 D | saveconfig.c | 34 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 D | attach.c | 88 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...] |
H A D | lxc-test-apparmor-mount | 164 pid=`run_cmd lxc-info -p -H -n $cname` 165 profile=`cat /proc/$pid/attr/current` 176 pid=`run_cmd lxc-info -p -H -n $cname` 177 profile=`cat /proc/$pid/attr/current` 191 pid=`run_cmd lxc-info -p -H -n $cname` || true 192 if [ -n "$pid" -a "$pid" != "-1" ]; then 194 echo "pid was $pid" 202 pid [all...] |
H A D | containertests.c | 36 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 D | startone.c | 36 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...] |
/lxc/src/lxc/cgroups/ |
H A D | cgroup.h | 47 bool (*enter)(void *hdata, pid_t pid); 48 bool (*create_legacy)(void *hdata, pid_t pid); 58 bool (*attach)(const char *name, const char *lxcpath, pid_t pid); 65 extern bool cgroup_attach(const char *name, const char *lxcpath, pid_t pid);
|
/lxc/src/lxc/tools/ |
H A D | lxc_start.c | 98 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 D | lxc_init.c | 79 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 D | lxc_unshare.c | 161 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));
|
H A D | lxc_checkpoint.c | 166 pid_t pid; local 168 pid = fork(); 169 if (pid < 0) { 174 if (pid == 0) { 180 return wait_for_pid(pid) == 0;
|