patches and low-level development discussion
 help / color / mirror / code / Atom feed
cc552001d0301a9a417b8895f7db0bdd5fd0c535 blob 487 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
// SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>

#define _GNU_SOURCE

#include <argz.h>
#include <stdlib.h>
#include <unistd.h>

#include "exec.h"

// Like execvp, but takes an argz vector instead of an argv array.
int execzp(const char *file, const char *argz, size_t len)
{
	char **argv = calloc(argz_count(argz, len) + 1, sizeof(char *));
	if (!argv)
		return -1;

	argz_extract(argz, len, argv);

	return execvp(file, argv);
}
debug log:

solving cc55200 ...
found cc55200 in https://spectrum-os.org/git/ucspi-vsock

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).