mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-04 17:20:10 +00:00
2003-10-30 sowmini.varadhan@sun.com
* lib/pid_output.c: (pid_output_lock) undo paulj's mindless edit.
This commit is contained in:
parent
3bf1c917d1
commit
e4eaf1d509
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user