From a07df8249df02fd55098ad1caf16d84cd98fe377 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 21 Oct 2002 00:05:01 +0000 Subject: Bugfix for pidfile_create() from Kelledin. (This used to be commit 4808a95f5f4536774d41bebca76660f010069117) --- 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 b98259fe5ef..393fb579944 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