search for: cmdline_fil

Displaying 4 results from an estimated 4 matches for "cmdline_fil".

Did you mean: cmdline_file
2020 Jun 02
0
[PATCH nbdkit 3/5] vddk: Miscellaneous improvements to reexec code.
...*v) +{ + free (v->ptr); +} + +/* List of strings. */ DEFINE_VECTOR_TYPE(string_vector, char *); #define CLEANUP_FREE_STRING_VECTOR \ @@ -68,11 +81,13 @@ cleanup_free_string_vector (string_vector *v) static void perform_reexec (const char *env, const char *prepend) { + static const char cmdline_file[] = "/proc/self/cmdline"; + static const char exe_file[] = "/proc/self/exe"; CLEANUP_FREE char *library = NULL; + CLEANUP_FREE_BUFFER buffer buf = empty_vector; CLEANUP_FREE_STRING_VECTOR string_vector argv = empty_vector; int fd; - size_t len = 0, buflen = 512; -...
2020 Jun 02
2
Re: [PATCH nbdkit 3/5] vddk: Miscellaneous improvements to reexec code.
...deletions(-) > > @@ -80,42 +95,40 @@ perform_reexec (const char *env, const char *prepend) > * until we get a short read. This assumes nbdkit did not alter its > * original argv[]. > */ > - fd = open ("/proc/self/cmdline", O_RDONLY); > + fd = open (cmdline_file, O_RDONLY|O_CLOEXEC); > if (fd == -1) { > - nbdkit_debug ("failure to parse original argv: %m"); > + nbdkit_debug ("open: %s: %m", cmdline_file); > return; > } > > - do { > - char *p = realloc (buf, buflen * 2); > + for (;;...
2020 Jun 02
0
Re: [PATCH nbdkit 3/5] vddk: Miscellaneous improvements to reexec code.
...>@@ -80,42 +95,40 @@ perform_reexec (const char *env, const char *prepend) > > * until we get a short read. This assumes nbdkit did not alter its > > * original argv[]. > > */ > >- fd = open ("/proc/self/cmdline", O_RDONLY); > >+ fd = open (cmdline_file, O_RDONLY|O_CLOEXEC); > > if (fd == -1) { > >- nbdkit_debug ("failure to parse original argv: %m"); > >+ nbdkit_debug ("open: %s: %m", cmdline_file); > > return; > > } > >- do { > >- char *p = realloc (buf, buflen *...
2020 Jun 02
9
[PATCH nbdkit 0/5] vddk: Fix password parameter.
Probably needs a bit of cleanup, but seems like it is generally the right direction. One thing I've noticed is that the expect test randomly (but rarely) hangs :-( I guess something is racey but I don't know what at the moment. Rich.