i would like to know whether there is any system call that can stop the
prosess but not terminate the program.
in the function below (part of the ping program)the program will terminate
with the exit call but i would like just the current ping process to stop
and the ping program will continue to ping other machine.
static void
finish(int ignore)
{
(void)ignore;
(void)signal(SIGINT, SIG_IGN);
(void)putchar('\n');
(void)fflush(stdout);
(void)printf("--- %s ping statistics ---\n", hostname);
(void)printf("%ld packets transmitteeeeeee, ", ntransmitted);
(void)printf("%ld packets received, ", nreceived);
(void)printf("%d%% packet loss",
(int) (((ntransmitted - nreceived) *100) /ntransmitted));
(void)putchar('\n');
if ((((ntransmitted - nreceived)*100)/ntransmitted) == 100)
printf("close\n");
if (nreceived==0) exit(1);
exit(0);
}
regards
lai sun loi