Commit | Line | Data |
---|---|---|
2117e02e MW |
1 | #include "tcpto.h" |
2 | #include "open.h" | |
3 | #include "substdio.h" | |
4 | #include "readwrite.h" | |
5 | ||
6 | char tcpto_cleanbuf[1024]; | |
7 | ||
8 | void tcpto_clean() /* running from queue/mess */ | |
9 | { | |
10 | int fd; | |
11 | int i; | |
12 | substdio ss; | |
13 | ||
14 | fd = open_write("../lock/tcpto"); | |
15 | if (fd == -1) return; | |
16 | substdio_fdbuf(&ss,write,fd,tcpto_cleanbuf,sizeof(tcpto_cleanbuf)); | |
17 | for (i = 0;i < sizeof(tcpto_cleanbuf);++i) substdio_put(&ss,"",1); | |
18 | substdio_flush(&ss); /* if it fails, bummer */ | |
19 | close(fd); | |
20 | } |