netatalk: server_lock.c File Reference

netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
server_lock.c File Reference
`#include <errno.h>`
`#include <fcntl.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <sys/ioctl.h>`
`#include <sys/stat.h>`
`#include <sys/time.h>`
`#include <sys/types.h>`
`#include <termios.h>`
`#include <unistd.h>`
`#include <atalk/compat.h>`
`#include <atalk/util.h>`

## Functions
pid_t | server_lock (char *program, char *pidfile, int debug)
int | check_lockfile (const char *program, const char *pidfile)
int | create_lockfile (const char *program, const char *pidfile)

## Variables
static struct itimerval | itimer

## Function Documentation

## ◆ check_lockfile()

int check_lockfile | ( | const char * | program,
|  | const char * | pidfile )

Check lockfile

## ◆ create_lockfile()

int create_lockfile | ( | const char * | program,
|  | const char * | pidfile )

Check and create lockfile

## ◆ server_lock()

pid_t server_lock | ( | char * | program,
|  | char * | pidfile,
|  | int | debug )

this creates an open lock file which hangs around until the program dies. it returns the pid. due to problems w/ solaris, this has been changed to do the kill() thing.

## Variable Documentation

## ◆ itimer

struct itimerval itimer
| static