~ubuntu-branches/ubuntu/maverick/libvirt/maverick

« back to all changes in this revision

Viewing changes to src/proxy_internal.c

Tags: upstream-0.6.4
Import upstream version 0.6.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
virProxyForkServer(void)
144
144
{
145
145
    const char *proxyPath = virProxyFindServerPath();
146
 
    int ret, status;
147
146
    pid_t pid;
148
147
    const char *proxyarg[2];
149
148
 
157
156
    proxyarg[0] = proxyPath;
158
157
    proxyarg[1] = NULL;
159
158
 
160
 
    if (virExec(NULL, proxyarg, NULL, NULL,
161
 
                &pid, -1, NULL, NULL, VIR_EXEC_DAEMON) < 0)
 
159
    if (virExecDaemonize(NULL, proxyarg, NULL, NULL,
 
160
                         &pid, -1, NULL, NULL, 0,
 
161
                         NULL, NULL, NULL) < 0)
162
162
        VIR_ERROR0("Failed to fork libvirt_proxy\n");
163
163
 
164
 
    /*
165
 
     * do a waitpid on the intermediate process to avoid zombies.
166
 
     */
167
 
retry_wait:
168
 
    ret = waitpid(pid, &status, 0);
169
 
    if (ret < 0) {
170
 
        if (errno == EINTR)
171
 
            goto retry_wait;
172
 
    }
173
 
 
174
164
    return (0);
175
165
}
176
166