~mdw
/
qmail
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Upstream qmail 1.03
[qmail]
/
trynpbg1.c
1
#include
"select.h"
2
#include
"open.h"
3
#include
"fifo.h"
4
5
#define FN
"temp-trynpbg1.fifo"
6
7
void
main
()
8
{
9
int
flagbug
;
10
struct
timeval instant
;
11
fd_set rfds
;
12
13
flagbug
=
0
;
14
if
(
fifo_make
(
FN
,
0600
) != -
1
) {
15
close
(
0
);
16
if
(
open_read
(
FN
) ==
0
) {
17
FD_ZERO
(&
rfds
);
18
FD_SET
(
0
,&
rfds
);
19
instant
.
tv_sec
=
instant
.
tv_usec
=
0
;
20
if
(
select
(
1
,&
rfds
,(
fd_set
*)
0
,(
fd_set
*)
0
,&
instant
) >
0
)
21
flagbug
=
1
;
22
}
23
unlink
(
FN
);
24
}
25
_exit
(!
flagbug
);
26
}