Mail Archives: djgpp-workers/1997/03/31/14:02:26
This is a multi-part message in MIME format.
--------------3142E89718253A8465C6526D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
What would be involved in getting a program that raises SIGALRM to work
with GDB?
See attacted test program that causes SEGV in GDB.
--------------3142E89718253A8465C6526D
Content-Type: text/plain; charset=us-ascii; name="TEST3.C.2"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="TEST3.C.2"
#include <sys/time.h>
#include <signal.h>
#include <conio.h>
static void
handler (signo)
{
printf ("handler\n");
}
main ()
{
struct itimerval value, ovalue;
int i;
value.it_interval.tv_sec = 0;
value.it_interval.tv_usec = 0;
value.it_value.tv_sec = 3;
value.it_value.tv_usec = 0;
signal (SIGALRM, handler);
setitimer (ITIMER_REAL, &value, NULL);
for (i=0; i<10; i++)
sleep(1);
}
--------------3142E89718253A8465C6526D--
- Raw text -