projects
/
deliverable
/
binutils-gdb.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
change delegation for to_read_description
[deliverable/binutils-gdb.git]
/
gdb
/
testsuite
/
gdb.base
/
interrupt.c
1
#include <errno.h>
2
#include <stdio.h>
3
#include <unistd.h>
4
#include <stdlib.h>
5
6
#ifdef SIGNALS
7
#include <signal.h>
8
9
static void
10
sigint_handler
(
int
signo
)
11
{
12
}
13
#endif
14
15
int
16
main
()
17
{
18
char
x
;
19
int
nbytes
;
20
#ifdef SIGNALS
21
signal
(
SIGINT
,
sigint_handler
);
22
#endif
23
printf
(
"talk to me baby
\n
"
);
24
while
(
1
)
25
{
26
nbytes
=
read
(
0
, &
x
,
1
);
27
if
(
nbytes
<
0
)
28
{
29
#ifdef EINTR
30
if
(
errno
!=
EINTR
)
31
#endif
32
{
33
perror
(
""
);
34
return
1
;
35
}
36
}
37
else if
(
nbytes
==
0
)
38
{
39
printf
(
"end of file
\n
"
);
40
exit
(
0
);
41
}
42
else
43
write
(
1
, &
x
,
1
);
44
}
45
return
0
;
46
}
47
48
int
49
func1
()
50
{
51
return
4
;
52
}
This page took
0.03271 seconds
and
4
git commands to generate.