From 051286cd46a471dfeb1663aabf2ba17e580ca25d Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 00:20:12 +0000 Subject: Bugfix for pidfile_create() from Kelledin. (This used to be commit 5a6ab85ea5479d103026032bdab8b2355b9c564c) --- source3/lib/pidfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/pidfile.c') 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); -- cgit