op_lockfile.c File Reference

#include "op_lockfile.h"
#include "op_file.h"
#include <errno.h>
#include <sys/types.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
Include dependency graph for op_lockfile.c:

Go to the source code of this file.

Functions

static pid_t op_read_lock_file (char const *file)
int op_write_lock_file (char const *file)

Detailed Description

PID-based lockfile management

Remarks:
Copyright 2002 OProfile authors
Read the file COPYING
Author:
John Levon
Philippe Elie

Definition in file op_lockfile.c.


Function Documentation

static pid_t op_read_lock_file ( char const *  file  )  [static]

Definition at line 22 of file op_lockfile.c.

Referenced by op_write_lock_file().

Here is the caller graph for this function:

int op_write_lock_file ( char const *  file  ) 

op_write_lock_file - write a lock file

Returns:
errno on failure, or 0 on success

Write the pid into the given lock file. Stale lock files are detected and reset.

Definition at line 42 of file op_lockfile.c.

References op_file_readable(), op_read_lock_file(), and pid.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1