File: README.md

package info (click to toggle)
cl-daemon 20170403-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 64 kB
  • sloc: lisp: 295; makefile: 13
file content (24 lines) | stat: -rw-r--r-- 646 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# daemon

This is a library which has simple functionality to make lisp process daemonize on unix like platform.
 
## Usage
Currently only `daemon:daemonize` and `daemon:exit` function are exported.
so just a simple example is good enough to show the idea of this library.

```
(daemon:daemonize :exit-parent t)

(with-open-file (out #P "/tmp/daemonlog" :direction :output :if-exists :supersede)
  (format out "~A ~A~%~A~%"
          (lisp-implementation-type)
          (lisp-implementation-version)
          (daemon::getpid)))

(sleep 90)
(daemon:exit)
```
then you can see the effect by the command below.
```
ps axo user,pid,ppid,command
```