6 #include "auto_qmail.h"
9 #define FATAL "qmail-tcpok: fatal: "
11 char buf[1024]; /* XXX: must match size in tcpto_clean.c, tcpto.c */
19 if (chdir(auto_qmail) == -1)
20 strerr_die4sys(111,FATAL,"unable to chdir to ",auto_qmail,": ");
21 if (chdir("queue/lock") == -1)
22 strerr_die4sys(111,FATAL,"unable to chdir to ",auto_qmail,"/queue/lock: ");
24 fd = open_write("tcpto");
26 strerr_die4sys(111,FATAL,"unable to write ",auto_qmail,"/queue/lock/tcpto: ");
27 if (lock_ex(fd) == -1)
28 strerr_die4sys(111,FATAL,"unable to lock ",auto_qmail,"/queue/lock/tcpto: ");
30 substdio_fdbuf(&ss,write,fd,buf,sizeof buf);
31 for (i = 0;i < sizeof buf;++i) substdio_put(&ss,"",1);
32 if (substdio_flush(&ss) == -1)
33 strerr_die4sys(111,FATAL,"unable to clear ",auto_qmail,"/queue/lock/tcpto: ");