summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpaul <paul>2003-10-30 21:58:06 +0000
committerpaul <paul>2003-10-30 21:58:06 +0000
commite4eaf1d509923fa6a53acb7f67732b3cfed0c8d2 (patch)
tree2faa9d9e1c1566768b057c4fbb89745fdf656d2a /lib
parent3bf1c917d10b3429afc139ad47252c3aa0dcd3a8 (diff)
2003-10-30 sowmini.varadhan@sun.com
* lib/pid_output.c: (pid_output_lock) undo paulj's mindless edit.
Diffstat (limited to 'lib')
-rw-r--r--lib/pid_output.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pid_output.c b/lib/pid_output.c
index e00e47ac..125ca403 100644
--- a/lib/pid_output.c
+++ b/lib/pid_output.c
@@ -56,8 +56,7 @@ pid_output_lock (char *path)
int fd;
pid_t pid;
char buf[16];
- struct flock lock = { .l_type = F_WRLCK,
- .l_whence = SEEK_END };
+ struct flock lock;
pid = getpid ();
@@ -72,6 +71,9 @@ pid_output_lock (char *path)
{
memset (&lock, 0, sizeof(lock));
+ lock.l_type = F_WRLCK;
+ lock.l_whence = SEEK_END;
+
if (fcntl(fd, F_SETLK, &lock) < 0)
{
zlog_err("Could not lock pid_file %s, exit", path);