Re: Problem with infinite loop in signal handler

Gunnar Larisch <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
Hi Mirski,

your signal handler function:

> >> void suspend(int sig) {
> >>    printf("suspending\n");
> >>    fflush(stdout);
> >>    while(1);
> >> }

Have you also tried your programm without calling printf and fflush in the
signal handler? Do you know the manpage signal (7) ? There is a list of
Async-signal-safe functions.

Can you tell me, why you need an endless loop in the signal
handler?

Regards,
Gunnar
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.