summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-10-21 00:20:12 +0000
committerTim Potter <tpot@samba.org>2002-10-21 00:20:12 +0000
commit051286cd46a471dfeb1663aabf2ba17e580ca25d (patch)
tree94e2911594bb13805c1df4e1bd22f57e84699434 /source3
parente9cc37b0bb26a67e80868cf53d2db08361d182dd (diff)
downloadsamba-051286cd46a471dfeb1663aabf2ba17e580ca25d.tar.gz
samba-051286cd46a471dfeb1663aabf2ba17e580ca25d.tar.bz2
samba-051286cd46a471dfeb1663aabf2ba17e580ca25d.zip
Bugfix for pidfile_create() from Kelledin.
(This used to be commit 5a6ab85ea5479d103026032bdab8b2355b9c564c)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/pidfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/pidfile.c b/source3/lib/pidfile.c
index b98259fe5e..393fb57994 100644
--- a/source3/lib/pidfile.c
+++ b/source3/lib/pidfile.c
@@ -100,7 +100,7 @@ void pidfile_create(char *name)
memset(buf, 0, sizeof(buf));
slprintf(buf, sizeof(buf) - 1, "%u\n", (unsigned int) sys_getpid());
- if (write(fd, buf, sizeof(buf)) != sizeof(buf)) {
+ if (write(fd, buf, strlen(buf)) != strlen(buf)) {
DEBUG(0,("ERROR: can't write to file %s: %s\n",
pidFile, strerror(errno)));
exit(1);