Deleted Added
full compact
exec.c (47061) exec.c (47461)
1/*-
2 * Copyright (c) 1999 Brian Somers <brian@Awfulhak.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999 Brian Somers <brian@Awfulhak.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: exec.c,v 1.1 1999/05/08 11:06:30 brian Exp $
26 * $Id: exec.c,v 1.2 1999/05/12 09:48:49 brian Exp $
27 */
28
29#include <sys/param.h>
30#include <sys/socket.h>
31#include <netinet/in.h>
32#include <arpa/inet.h>
33#include <netdb.h>
34#include <netinet/in_systm.h>

--- 57 unchanged lines hidden (view full) ---

92 NULL,
93 NULL
94};
95
96struct device *
97exec_iov2device(int type, struct physical *p, struct iovec *iov,
98 int *niov, int maxiov)
99{
27 */
28
29#include <sys/param.h>
30#include <sys/socket.h>
31#include <netinet/in.h>
32#include <arpa/inet.h>
33#include <netdb.h>
34#include <netinet/in_systm.h>

--- 57 unchanged lines hidden (view full) ---

92 NULL,
93 NULL
94};
95
96struct device *
97exec_iov2device(int type, struct physical *p, struct iovec *iov,
98 int *niov, int maxiov)
99{
100 if (type == EXEC_DEVICE)
100 if (type == EXEC_DEVICE) {
101 physical_SetupStack(p, execdevice.name, PHYSICAL_FORCE_ASYNC);
101 return &execdevice;
102 return &execdevice;
103 }
102
103 return NULL;
104}
105
106struct device *
107exec_Create(struct physical *p)
108{
109 if (p->fd < 0 && *p->name.full == '!') {

--- 47 unchanged lines hidden (view full) ---

157 _exit(127);
158 break;
159
160 default:
161 close(fids[1]);
162 p->fd = fids[0];
163 waitpid(pid, &stat, 0);
164 log_Printf(LogDEBUG, "Using descriptor %d for child\n", p->fd);
104
105 return NULL;
106}
107
108struct device *
109exec_Create(struct physical *p)
110{
111 if (p->fd < 0 && *p->name.full == '!') {

--- 47 unchanged lines hidden (view full) ---

159 _exit(127);
160 break;
161
162 default:
163 close(fids[1]);
164 p->fd = fids[0];
165 waitpid(pid, &stat, 0);
166 log_Printf(LogDEBUG, "Using descriptor %d for child\n", p->fd);
165 physical_SetupStack(p, PHYSICAL_FORCE_ASYNC);
167 physical_SetupStack(p, execdevice.name, PHYSICAL_FORCE_ASYNC);
166 return &execdevice;
167 }
168 }
169 }
170
171 return NULL;
172}
168 return &execdevice;
169 }
170 }
171 }
172
173 return NULL;
174}