Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 257968
Collapse All | Expand All

(-)../netplug-1.2.9_orig/main.c (-1 / +10 lines)
Lines 155-167 Link Here
155
{
155
{
156
    struct child_exit ce;
156
    struct child_exit ce;
157
    int ret;
157
    int ret;
158
    ssize_t s = 0;
158
159
159
    assert(sig == SIGCHLD);
160
    assert(sig == SIGCHLD);
160
161
161
    ce.pid = info->si_pid;
162
    ce.pid = info->si_pid;
162
    ret = waitpid(info->si_pid, &ce.status, 0);
163
    ret = waitpid(info->si_pid, &ce.status, 0);
163
    if (ret == info->si_pid)
164
    if (ret == info->si_pid)
164
        write(child_handler_pipe[1], &ce, sizeof(ce));
165
    {
166
        s = write(child_handler_pipe[1], &ce, sizeof(ce));
167
168
	if (s == -1)
169
	{
170
	    do_log(LOG_ERR, "can't write into pipe");
171
	    exit(1);
172
	}
173
    }
165
}
174
}
166
175
167
/* Poll the existing interface state, so we can catch any state
176
/* Poll the existing interface state, so we can catch any state

Return to bug 257968