File: trigger_pull.c

package info (click to toggle)
bglibs 2.04%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,468 kB
  • sloc: ansic: 15,821; perl: 674; sh: 63; makefile: 29
file content (14 lines) | stat: -rw-r--r-- 253 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "sysdeps.h"
#include <fcntl.h>
#include <unistd.h>
#include "trigger.h"

/** Activate a trigger. */
void trigger_pull(const char* path)
{
  int fd;
  if ((fd = open(path, O_WRONLY | O_NDELAY)) >= 0) {
    write(fd, "", 1);
    close(fd);
  }
}