chiark
/
gitweb
/
~mdw
/
qmail
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
addrcheck: Don't spew userv error messages at SMTP clients.
[qmail]
/
hostname.c
1
#include "substdio.h"
2
#include "subfd.h"
3
#include "readwrite.h"
4
#include "exit.h"
5
6
char host[256];
7
8
void main()
9
{
10
host[0] = 0; /* sigh */
11
gethostname(host,sizeof(host));
12
host[sizeof(host) - 1] = 0;
13
substdio_puts(subfdoutsmall,host);
14
substdio_puts(subfdoutsmall,"\n");
15
substdio_flush(subfdoutsmall);
16
_exit(0);
17
}