equal
deleted
inserted
replaced
10 #include <sys/select.h> |
10 #include <sys/select.h> |
11 #include <unistd.h> |
11 #include <unistd.h> |
12 #include <errno.h> |
12 #include <errno.h> |
13 #include <signal.h> |
13 #include <signal.h> |
14 #include <string.h> |
14 #include <string.h> |
|
15 #include <fcntl.h> |
15 |
16 |
16 #include "main.h" |
17 #include "main.h" |
17 #include "handlers.h" |
18 #include "handlers.h" |
18 |
19 |
19 /* signals.c */ |
20 /* signals.c */ |
20 extern int child_died; |
21 extern int child_died; |
|
22 |
|
23 /* app_control.c */ |
|
24 extern int savefile; |
21 |
25 |
22 /*extern*/ |
26 /*extern*/ |
23 void fdset_dump(fd_set *set, int maxfd); |
27 void fdset_dump(fd_set *set, int maxfd); |
24 |
28 |
25 static void loop() |
29 static void loop() |
141 #ifdef linux |
145 #ifdef linux |
142 if (command_line.s_param.serve_eth) |
146 if (command_line.s_param.serve_eth) |
143 s_eth_init(); |
147 s_eth_init(); |
144 #endif /* linux */ |
148 #endif /* linux */ |
145 |
149 |
|
150 if (command_line.s_param.savefile) |
|
151 { |
|
152 savefile = open(command_line.s_param.savefile, O_CREAT | O_RDWR, 0666); |
|
153 } |
|
154 |
146 child = fork_app(command_line.s_param.command); |
155 child = fork_app(command_line.s_param.command); |
147 |
156 |
148 if (command_line.s_param.nohup) |
157 if (command_line.s_param.nohup) |
149 { |
158 { |
150 ignore_sighup(); |
159 ignore_sighup(); |