search for: iso_fd

Displaying 3 results from an estimated 3 matches for "iso_fd".

Did you mean: so_fd
2020 Apr 09
0
[PATCH nbdkit v2 2/3] iso: Implement this plugin using fileops (read-only).
...lude "cleanup.h" +#include "fileops.h" #include "utils.h" /* List of directories parsed from the command line. */ @@ -57,7 +59,7 @@ static const char *isoprog = ISOPROG; static const char *params = NULL; /* The temporary ISO. */ -static int fd = -1; +static int iso_fd = -1; /* Construct the temporary ISO. */ static int @@ -80,8 +82,8 @@ make_iso (void) return -1; } - fd = mkstemp (template); - if (fd == -1) { + iso_fd = mkstemp (template); + if (iso_fd == -1) { nbdkit_error ("mkstemp: %s: %m", template); return -1; } @@ -...
2020 Apr 09
6
[PATCH nbdkit v2 0/3] Implement fileops.
Needs some work still, see in particular the commit message for patch 3. Rich.
2020 Apr 09
2
Re: [PATCH nbdkit v2 2/3] iso: Implement this plugin using fileops (read-only).
...struct fileops *fops; > + int fd; > + > + fops = malloc (sizeof *fops); > + if (fops == NULL) { > + nbdkit_error ("malloc: %m"); > + return NULL; > + } > + > + /* Copy the fd because fileops needs to have its own file descriptor. */ > + fd = dup (iso_fd); We use system(), but only during .get_ready(). I don't see any places where we fork a child after the first .open, so not setting FD_CLOEXEC here won't leak into the next client's connection (if we ever add later fork()s, we'd have to use fcntl(F_DUPFD_CLOEXEC) instead); but...