342{
344 if (cpus<1)
345 {
346
348 }
349#if 0
351 {
352 int cp_std[2];
353 int cp_hstd[2];
354 int err1=pipe(cp_std);
355 int err2=pipe(cp_hstd);
356 if (err1||err2)
357 {
358 Werror(
"pipe failed with %d\n",errno);
359 si_close(cp_std[0]);
360 si_close(cp_std[1]);
361 si_close(cp_hstd[0]);
362 si_close(cp_hstd[1]);
364 }
365 pid_t pid_std=fork();
366 if (pid_std==0)
367 {
369 si_close(cp_std[0]);
370 si_close(cp_hstd[0]);
371 si_close(cp_hstd[1]);
373 memset(&d,0,sizeof(d));
374 d.
f_write=fdopen(cp_std[1],
"w");
381 _exit(0);
382 }
383 pid_t pid_hstd=fork();
384 if (pid_hstd==0)
385 {
387 si_close(cp_hstd[0]);
388 si_close(cp_std[0]);
389 si_close(cp_std[1]);
391 memset(&d,0,sizeof(d));
392 d.
f_write=fdopen(cp_hstd[1],
"w");
395
399 {
401 }
403 _exit(0);
404 }
405
406 si_close(cp_std[1]);
407 si_close(cp_hstd[1]);
408 #ifdef HAVE_POLL
409 pollfd pfd[2];
410 pfd[0].fd=cp_std[0];
411 pfd[0].events=POLLIN;
412 pfd[1].fd=cp_hstd[0];
413 pfd[1].events=POLLIN;
414 int s=si_poll(pfd,2,-1);
417 memset(&d,0,sizeof(d));
420 {
424 si_close(cp_hstd[0]);
426 si_close(cp_std[0]);
427 kill(pid_hstd,SIGTERM);
428 si_waitpid(pid_std,
NULL,0);
429 si_waitpid(pid_hstd,
NULL,0);
430 }
432 {
436 si_close(cp_std[0]);
438 si_close(cp_hstd[0]);
439 kill(pid_std,SIGTERM);
440 si_waitpid(pid_hstd,
NULL,0);
441 si_waitpid(pid_std,
NULL,0);
442 }
444 #endif
445 }
446#endif
448}
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
static void * feOptValue(feOptIndex opt)
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)