]> git.ipfire.org Git - people/ms/pakfire.git/blobdiff - src/libpakfire/os.c
Revert "jail: This changes how we launch sub-processes"
[people/ms/pakfire.git] / src / libpakfire / os.c
index 9bf8658610362276ec056c4657deb980425d3e3f..bbc111b16cd721dfd0f1fbb6adac26de0e71e657 100644 (file)
@@ -306,43 +306,3 @@ int pakfire_distro(struct pakfire_distro* distro, const char* path) {
 
        return pakfire_parse_file(path, pakfire_parse_distro, distro);
 }
-
-// PIDFD
-
-static int pidfd_parse_pid(char* line, size_t length, void* data) {
-       pid_t* pid = data;
-       int r;
-
-       // Key & Value
-       char* k = NULL;
-       char* v = NULL;
-
-       // Split the line
-       r = pakfire_parse_split_line(line, length, &k, &v, ':');
-       if (r)
-               return r;
-
-       // If we didn't get a result we skip this line
-       if (!k || !v)
-               return 0;
-
-       if (strcmp(k, "Pid") == 0)
-               *pid = strtoul(v, NULL, 10);
-
-       return 0;
-}
-
-int pidfd_get_pid(int pidfd, pid_t* pid) {
-       char path[PATH_MAX];
-       int r;
-
-       if (!pid)
-               return -EINVAL;
-
-       // Compose path
-       r = pakfire_string_format(path, "/proc/self/fdinfo/%d", pidfd);
-       if (r)
-               return r;
-
-       return pakfire_parse_file(path, pidfd_parse_pid, pid);
-}