155 |
|
else |
156 |
|
filter(stdin, "standard input"); |
157 |
|
quit(0); |
158 |
+ |
return 0; /* pro forma return */ |
159 |
|
} |
160 |
|
|
161 |
+ |
|
162 |
+ |
#ifndef SIGALRM |
163 |
+ |
#define SIGALRM SIGTERM |
164 |
+ |
#endif |
165 |
|
static void |
166 |
|
killpersist(void) /* kill persistent rtrace process */ |
167 |
|
{ |
175 |
|
fclose(fp); |
176 |
|
} |
177 |
|
|
178 |
+ |
|
179 |
|
int |
180 |
|
done_rprocs(struct rtproc *rtp) |
181 |
|
{ |
219 |
|
ofun[OBJ_SPHERE].funp = o_sphere; |
220 |
|
ofun[OBJ_RING].funp = o_ring; |
221 |
|
/* set up signal handling */ |
222 |
< |
#ifdef SIGPIPE /* not present on Windows */ |
222 |
> |
signal(SIGINT, quit); |
223 |
> |
#ifdef SIGHUP |
224 |
> |
signal(SIGHUP, quit); |
225 |
> |
#endif |
226 |
> |
#ifdef SIGTERM |
227 |
> |
signal(SIGTERM, quit); |
228 |
> |
#endif |
229 |
> |
#ifdef SIGPIPE |
230 |
|
signal(SIGPIPE, quit); |
231 |
|
#endif |
232 |
|
rtp = &rt0; /* start rtrace process(es) */ |