mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
Use pid_t for all PID tracking variables (John Levon)
This commit is contained in:
parent
9e8517c745
commit
7c4bc3f92f
@ -1,3 +1,10 @@
|
||||
Thu Dec 18 11:56:58 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
Use pid_t for all PID tracking variables (John Levon)
|
||||
* src/openvz_driver.c, src/proxy_internal.h, src/remote_internal.c,
|
||||
src/storage_backend.c, src/uml_driver.c, src/util.c, src/util.h:
|
||||
s/int/pid_t/
|
||||
|
||||
Thu Dec 18 11:54:58 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* qemud/Makefile.am: Don't munge default network XML if
|
||||
|
@ -1102,7 +1102,8 @@ static char *openvzGetCapabilities(virConnectPtr conn) {
|
||||
|
||||
static int openvzListDomains(virConnectPtr conn, int *ids, int nids) {
|
||||
int got = 0;
|
||||
int veid, pid;
|
||||
int veid;
|
||||
pid_t pid;
|
||||
int outfd = -1;
|
||||
int errfd = -1;
|
||||
int ret;
|
||||
@ -1153,7 +1154,8 @@ static int openvzNumDomains(virConnectPtr conn) {
|
||||
static int openvzListDefinedDomains(virConnectPtr conn,
|
||||
char **const names, int nnames) {
|
||||
int got = 0;
|
||||
int veid, pid, outfd = -1, errfd = -1, ret;
|
||||
int veid, outfd = -1, errfd = -1, ret;
|
||||
pid_t pid;
|
||||
char vpsname[32];
|
||||
char buf[32];
|
||||
char *endptr;
|
||||
|
@ -144,7 +144,8 @@ static int
|
||||
virProxyForkServer(void)
|
||||
{
|
||||
const char *proxyPath = virProxyFindServerPath();
|
||||
int ret, pid, status;
|
||||
int ret, status;
|
||||
pid_t pid;
|
||||
const char *proxyarg[2];
|
||||
|
||||
if (!proxyPath) {
|
||||
|
@ -252,7 +252,8 @@ remoteForkDaemon(virConnectPtr conn)
|
||||
{
|
||||
const char *daemonPath = remoteFindDaemonPath();
|
||||
const char *const daemonargs[] = { daemonPath, "--timeout=30", NULL };
|
||||
int ret, pid, status;
|
||||
int ret, status;
|
||||
pid_t pid;
|
||||
|
||||
if (!daemonPath) {
|
||||
error(conn, VIR_ERR_INTERNAL_ERROR, _("failed to find libvirtd binary"));
|
||||
|
@ -411,7 +411,8 @@ virStorageBackendRunProgRegex(virConnectPtr conn,
|
||||
void *data,
|
||||
int *outexit)
|
||||
{
|
||||
int child = 0, fd = -1, exitstatus, err, failed = 1;
|
||||
int fd = -1, exitstatus, err, failed = 1;
|
||||
pid_t child = 0;
|
||||
FILE *list = NULL;
|
||||
regex_t *reg;
|
||||
regmatch_t *vars = NULL;
|
||||
@ -575,7 +576,8 @@ virStorageBackendRunProgNul(virConnectPtr conn,
|
||||
void *data)
|
||||
{
|
||||
size_t n_tok = 0;
|
||||
int child = 0, fd = -1, exitstatus;
|
||||
int fd = -1, exitstatus;
|
||||
pid_t child = 0;
|
||||
FILE *fp = NULL;
|
||||
char **v;
|
||||
int err = -1;
|
||||
|
@ -711,7 +711,8 @@ static int umlStartVMDaemon(virConnectPtr conn,
|
||||
virDomainObjPtr vm) {
|
||||
const char **argv = NULL, **tmp;
|
||||
const char **progenv = NULL;
|
||||
int i, ret, pid;
|
||||
int i, ret;
|
||||
pid_t pid;
|
||||
char *logfile;
|
||||
int logfd = -1;
|
||||
struct stat sb;
|
||||
|
10
src/util.c
10
src/util.c
@ -182,10 +182,11 @@ __virExec(virConnectPtr conn,
|
||||
const char *const*argv,
|
||||
const char *const*envp,
|
||||
const fd_set *keepfd,
|
||||
int *retpid,
|
||||
pid_t *retpid,
|
||||
int infd, int *outfd, int *errfd,
|
||||
int flags) {
|
||||
int pid, null, i, openmax;
|
||||
pid_t pid;
|
||||
int null, i, openmax;
|
||||
int pipeout[2] = {-1,-1};
|
||||
int pipeerr[2] = {-1,-1};
|
||||
int childout = -1;
|
||||
@ -439,7 +440,7 @@ virExec(virConnectPtr conn,
|
||||
const char *const*argv,
|
||||
const char *const*envp,
|
||||
const fd_set *keepfd,
|
||||
int *retpid,
|
||||
pid_t *retpid,
|
||||
int infd, int *outfd, int *errfd,
|
||||
int flags) {
|
||||
char *argv_str;
|
||||
@ -554,7 +555,8 @@ int
|
||||
virRun(virConnectPtr conn,
|
||||
const char *const*argv,
|
||||
int *status) {
|
||||
int childpid, exitstatus, execret, waitret;
|
||||
pid_t childpid;
|
||||
int exitstatus, execret, waitret;
|
||||
int ret = -1;
|
||||
int errfd = -1, outfd = -1;
|
||||
char *outbuf = NULL;
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "verify.h"
|
||||
#include <sys/select.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
int saferead(int fd, void *buf, size_t count);
|
||||
ssize_t safewrite(int fd, const void *buf, size_t count);
|
||||
@ -41,7 +42,7 @@ int virExec(virConnectPtr conn,
|
||||
const char *const*argv,
|
||||
const char *const*envp,
|
||||
const fd_set *keepfd,
|
||||
int *retpid,
|
||||
pid_t *retpid,
|
||||
int infd,
|
||||
int *outfd,
|
||||
int *errfd,
|
||||
|
Loading…
Reference in New Issue
Block a user