[master] b12a97b Send stderr to the right file

Federico G. Schwindt fgsch at lodoss.net
Thu Sep 10 18:19:59 CEST 2015


commit b12a97b7b16bcc143f2081d59bb8fbd24c4ad541
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Thu Sep 10 16:44:38 2015 +0100

    Send stderr to the right file
    
    While here print signals and exit code in decimal.

diff --git a/bin/varnishtest/vtc_process.c b/bin/varnishtest/vtc_process.c
index fffe9bf..88962b5 100644
--- a/bin/varnishtest/vtc_process.c
+++ b/bin/varnishtest/vtc_process.c
@@ -165,11 +165,11 @@ process_thread(void *priv)
 	if (WIFEXITED(p->status) && WEXITSTATUS(p->status) == 0)
 		return (NULL);
 #ifdef WCOREDUMP
-	vtc_log(p->vl, 2, "Bad exit code: %04x sig %x exit %x core %x",
+	vtc_log(p->vl, 2, "Bad exit code: %04x sig %d exit %d core %d",
 	    p->status, WTERMSIG(p->status), WEXITSTATUS(p->status),
 	    WCOREDUMP(p->status));
 #else
-	vtc_log(p->vl, 2, "Bad exit code: %04x sig %x exit %x",
+	vtc_log(p->vl, 2, "Bad exit code: %04x sig %d exit %d",
 	    p->status, WTERMSIG(p->status), WEXITSTATUS(p->status));
 #endif
 
@@ -202,7 +202,7 @@ process_start(struct process *p)
 	if (p->pid == 0) {
 		assert(dup2(p->fds[0], 0) == 0);
 		assert(dup2(out_fd, 1) == 1);
-		assert(dup2(out_fd, 2) == 2);
+		assert(dup2(err_fd, 2) == 2);
 		for (i = 3; i <getdtablesize(); i++)
 			(void)close(i);
 		AZ(execl("/bin/sh", "/bin/sh", "-c", VSB_data(cl), (char*)0));



More information about the varnish-commit mailing list