diff options
author | Tim Potter <tpot@samba.org> | 2002-10-21 00:05:01 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-10-21 00:05:01 +0000 |
commit | a07df8249df02fd55098ad1caf16d84cd98fe377 (patch) | |
tree | e7d09e1dd092fd22aa85b4abe194a9727ef046d5 /source3/lib | |
parent | 7c6400a78f8939d673f5df4f0e2c73f859f4ff23 (diff) | |
download | samba-a07df8249df02fd55098ad1caf16d84cd98fe377.tar.gz samba-a07df8249df02fd55098ad1caf16d84cd98fe377.tar.bz2 samba-a07df8249df02fd55098ad1caf16d84cd98fe377.zip |
Bugfix for pidfile_create() from Kelledin.
(This used to be commit 4808a95f5f4536774d41bebca76660f010069117)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/pidfile.c | 2 |
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); |