chiark
/
gitweb
/
~ianmdlvl
/
adns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
regression tests: Properly handle adnshost et al exit status
[adns.git]
/
regress
/
hcommon.c
diff --git
a/regress/hcommon.c
b/regress/hcommon.c
index e63a8cda57a0b30d40aefdc87c7bb5f46ef64e06..0aa3ffb05e58550310f050f708ed06ebc1b95602 100644
(file)
--- a/
regress/hcommon.c
+++ b/
regress/hcommon.c
@@
-167,6
+167,10
@@
void Tvbbytes(const void *buf, int len) {
void Tvbfdset(int max, const fd_set *fds) {
int i;
const char *comma= "";
void Tvbfdset(int max, const fd_set *fds) {
int i;
const char *comma= "";
+ if (!fds) {
+ Tvba("null");
+ return;
+ }
Tvba("[");
for (i=0; i<max; i++) {
if (!FD_ISSET(i,fds)) continue;
Tvba("[");
for (i=0; i<max; i++) {
if (!FD_ISSET(i,fds)) continue;
@@
-285,7
+289,7
@@
void *Hrealloc(void *op, size_t nsz) {
Hfree(op);
return np;
}
Hfree(op);
return np;
}
-void
H
exit(int rv) {
+void
T
exit(int rv) {
struct malloced *loopnode;
Tshutdown();
adns__vbuf_free(&vb);
struct malloced *loopnode;
Tshutdown();
adns__vbuf_free(&vb);
@@
-299,6
+303,12
@@
void Hexit(int rv) {
}
exit(rv);
}
}
exit(rv);
}
+void Hexit(int rv) {
+ vb.used= 0;
+ Tvbf("exit %d", rv);
+ Q_vb();
+ Texit(0);
+}
pid_t Hgetpid(void) {
return 2264; /* just some number */
}
pid_t Hgetpid(void) {
return 2264; /* just some number */
}