282{
283#if 0
285 {
286 int cp_std[2];
287 int cp_hstd[2];
288 int err1=pipe(cp_std);
289 int err2=pipe(cp_hstd);
290 if (err1||err2)
291 {
292 Werror(
"pipe failed with %d\n",errno);
293 si_close(cp_std[0]);
294 si_close(cp_std[1]);
295 si_close(cp_hstd[0]);
296 si_close(cp_hstd[1]);
298 }
299 pid_t pid_std=fork();
300 if (pid_std==0)
301 {
303 si_close(cp_std[0]);
304 si_close(cp_hstd[0]);
305 si_close(cp_hstd[1]);
307 memset(&d,0,sizeof(d));
308 d.
f_write=fdopen(cp_std[1],
"w");
315 _exit(0);
316 }
317 pid_t pid_hstd=fork();
318 if (pid_hstd==0)
319 {
321 si_close(cp_hstd[0]);
322 si_close(cp_std[0]);
323 si_close(cp_std[1]);
325 memset(&d,0,sizeof(d));
326 d.
f_write=fdopen(cp_hstd[1],
"w");
329
333 {
335 }
337 _exit(0);
338 }
339
340 si_close(cp_std[1]);
341 si_close(cp_hstd[1]);
342 #ifdef HAVE_POLL
343 pollfd pfd[2];
344 pfd[0].fd=cp_std[0];
345 pfd[0].events=POLLIN;
346 pfd[1].fd=cp_hstd[0];
347 pfd[1].events=POLLIN;
348 int s=si_poll(pfd,2,-1);
351 memset(&d,0,sizeof(d));
354 {
358 si_close(cp_hstd[0]);
360 si_close(cp_std[0]);
361 kill(pid_hstd,SIGTERM);
362 si_waitpid(pid_std,
NULL,0);
363 si_waitpid(pid_hstd,
NULL,0);
364 }
366 {
370 si_close(cp_std[0]);
372 si_close(cp_hstd[0]);
373 kill(pid_std,SIGTERM);
374 si_waitpid(pid_hstd,
NULL,0);
375 si_waitpid(pid_std,
NULL,0);
376 }
378 #endif
379 }
380#endif
382}
si_hdl_typ si_set_signal(int sig, si_hdl_typ signal_handler)
meta function for binding a signal to an handler
void sig_term_hdl_child(int)
const CanonicalForm int s
ideal kTryHilbstd(ideal F, ideal Q)
void Werror(const char *fmt,...)
ideal ssiReadIdeal(ssiInfo *d)
void ssiWriteIdeal(const ssiInfo *d, int typ, const ideal I)