This commit was generated by cvs2svn to track changes on a CVS vendor
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / interrupt.c
CommitLineData
c906108c
SS
1#include <errno.h>
2#include <stdio.h>
3int
4main ()
5{
6 char x;
7 int nbytes;
8#ifdef usestubs
9 set_debug_traps();
10 breakpoint();
11#endif
12 printf ("talk to me baby\n");
13 while (1)
14 {
15 nbytes = read (0, &x, 1);
16 if (nbytes < 0)
17 {
18#ifdef EINTR
19 if (errno != EINTR)
20#endif
21 perror ("");
22 }
23 else if (nbytes == 0)
24 {
25 printf ("end of file\n");
26 exit (0);
27 }
28 else
29 write (1, &x, 1);
30 }
31}
32
33int
34func1 ()
35{
36 return 4;
37}
This page took 0.024653 seconds and 4 git commands to generate.