all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 217dbfce8a6dc8a1a306bb21f2b2c291d36e4a8d 1708 bytes (raw)
name: lib/sd-socket.h 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* Copied and adapted from systemd source code. */
#ifndef _SD_SOCKET_H
#define _SD_SOCKET_H 1

#include <inttypes.h>
#include <sys/types.h>
#include <sys/socket.h>

/*
  The following functionality is provided:

  - Support for logging with log levels on stderr
  - File descriptor passing for socket-based activation
  - Daemon startup and status notification
  - Detection of systemd boots

  See sd-daemon(3) for more information.
*/

/* The first passed file descriptor is fd 3 */
#define SD_LISTEN_FDS_START 3

/*
  Helper call for identifying a passed file descriptor. Returns 1 if
  the file descriptor is a socket of type (SOCK_DGRAM, SOCK_STREAM,
  ...), 0 otherwise. If type is 0 a socket type check will not be done
  and the call only verifies if the file descriptor refers to a
  socket. If listening is > 0 it is verified that the socket is in
  listening mode. (i.e. listen() has been called) If listening is == 0
  it is verified that the socket is not in listening mode. If
  listening is < 0 no listening mode check is done. Returns a negative
  errno style error code on failure.

  See sd_is_socket(3) for more information.
*/
int sd_is_socket(int fd, int type, int listening);

/*
  Tells systemd that daemon startup or daemon reload is finished (only
  relevant for services of Type=notify).

  See https://www.freedesktop.org/software/systemd/man/devel/sd_notify.html#Notes
  for more information.
*/
int sd_notify_ready(void);

/*
  Tells systemd that the daemon is about to go down.

  See https://www.freedesktop.org/software/systemd/man/devel/sd_notify.html#Notes
  for more information.

 */
int sd_notify_stopping(void);

#endif

debug log:

solving 217dbfce8a6 ...
found 217dbfce8a6 in https://yhetil.org/guix/87msow7xrs.fsf@ngraves.fr/

applying [1/1] https://yhetil.org/guix/87msow7xrs.fsf@ngraves.fr/
diff --git a/lib/sd-socket.h b/lib/sd-socket.h
new file mode 100644
index 00000000000..217dbfce8a6

Checking patch lib/sd-socket.h...
Applied patch lib/sd-socket.h cleanly.

index at:
100644 217dbfce8a6dc8a1a306bb21f2b2c291d36e4a8d	lib/sd-socket.h

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.