File: Daemon.xs

package info (click to toggle)
liblinux-systemd-perl 1.201600-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 284 kB
  • sloc: perl: 640; makefile: 7
file content (17 lines) | stat: -rw-r--r-- 371 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

#include <systemd/sd-daemon.h>

MODULE = Linux::Systemd::Daemon	PACKAGE = Linux::Systemd::Daemon

PROTOTYPES: DISABLE

NO_OUTPUT int
notify(const char *state)
    CODE:
        RETVAL = sd_notify( 0, state );
    POSTCALL:
        if (RETVAL < 0)
             croak("Error %d while sending notification", RETVAL);