summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-01-14 17:11:12 +0100
committerVolker Lendecke <vl@samba.org>2015-02-26 15:58:05 +0100
commitbd6bc30693ce989588d8ebebeb717f4e82d590c4 (patch)
tree84d8d78233c3a6738fb8b69499613fce47bfab18 /lib
parent079c301c013478597852491882ab27ef6870900a (diff)
downloadsamba-bd6bc30693ce989588d8ebebeb717f4e82d590c4.tar.gz
samba-bd6bc30693ce989588d8ebebeb717f4e82d590c4.tar.xz
samba-bd6bc30693ce989588d8ebebeb717f4e82d590c4.zip
Fix whitespace
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/util/pidfile.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/util/pidfile.c b/lib/util/pidfile.c
index 1b382d1217..4960be66e9 100644
--- a/lib/util/pidfile.c
+++ b/lib/util/pidfile.c
@@ -1,20 +1,20 @@
/* this code is broken - there is a race condition with the unlink (tridge) */
-/*
+/*
Unix SMB/CIFS implementation.
pidfile handling
Copyright (C) Andrew Tridgell 1998
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -30,7 +30,7 @@
/**
* return the pid in a pidfile. return 0 if the process (or pidfile)
- * does not exist
+ * does not exist
*/
pid_t pidfile_pid(const char *piddir, const char *name)
{
@@ -62,7 +62,7 @@ pid_t pidfile_pid(const char *piddir, const char *name)
pidFile));
goto noproc;
}
-
+
if (!process_exists_by_pid(ret)) {
DEBUG(10, ("Process with PID=%d does not exist.\n", (int)ret));
goto noproc;
@@ -90,7 +90,7 @@ pid_t pidfile_pid(const char *piddir, const char *name)
}
/**
- * create a pid file in the pid directory. open it and leave it locked
+ * create a pid file in the pid directory. open it and leave it locked
*/
void pidfile_create(const char *piddir, const char *name)
{
@@ -106,14 +106,14 @@ void pidfile_create(const char *piddir, const char *name)
pid = pidfile_pid(piddir, name);
if (pid != 0) {
- DEBUG(0,("ERROR: %s is already running. File %s exists and process id %d is running.\n",
+ DEBUG(0,("ERROR: %s is already running. File %s exists and process id %d is running.\n",
name, pidFile, (int)pid));
exit(1);
}
fd = open(pidFile, O_NONBLOCK | O_CREAT | O_WRONLY | O_EXCL, 0644);
if (fd == -1) {
- DEBUG(0,("ERROR: can't open %s: Error was %s\n", pidFile,
+ DEBUG(0,("ERROR: can't open %s: Error was %s\n", pidFile,
strerror(errno)));
exit(1);
}
@@ -121,7 +121,7 @@ void pidfile_create(const char *piddir, const char *name)
smb_set_close_on_exec(fd);
if (fcntl_lock(fd,F_SETLK,0,1,F_WRLCK)==false) {
- DEBUG(0,("ERROR: %s : fcntl lock of file %s failed. Error was %s\n",
+ DEBUG(0,("ERROR: %s : fcntl lock of file %s failed. Error was %s\n",
name, pidFile, strerror(errno)));
exit(1);
}
@@ -129,7 +129,7 @@ void pidfile_create(const char *piddir, const char *name)
memset(buf, 0, sizeof(buf));
slprintf(buf, sizeof(buf) - 1, "%u\n", (unsigned int) getpid());
if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) {
- DEBUG(0,("ERROR: can't write to file %s: %s\n",
+ DEBUG(0,("ERROR: can't write to file %s: %s\n",
pidFile, strerror(errno)));
exit(1);
}