} else if(*s == '\t') {
fputs("\\t", o);
} else if((*s < 32) || (*s >= 128)) {
- fprintf(o, "\\x%02x", *s);
+ fprintf(o, "\\x%02x", (int)(unsigned char)*s);
} else {
fputc(*s, o);
}
if(pfd[1].revents & POLLHUP)
break;
}
+ fclose(out);
if(pidfile != NULL)
unlink(pidfile);
return(0);