Common Lisp Package: DAEMON

README:

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 `

FUNCTION

Public

Undocumented

DAEMONIZE (&KEY INPUT OUTPUT ERROR (UMASK +DEFAULT-MASK+) PIDFILE EXIT-PARENT (EXIT-HOOK T) (DISABLE-DEBUGGER T) USER GROUP SIGABRT SIGHUP SIGINT SIGTERM)

EXIT

FORK

Private

Undocumented

CHDIR (DIR)

DETOUCH-TERMINAL (&KEY INPUT OUTPUT ERROR)

DUP2 (OLD NEW)

GETGRGID (GID)

GETGRNAM (NAME)

GETPID

GETPPID

GETPWNAM (NAME)

GETPWUID (ID)

GETUID

GROUP-GID (GRP)

PASSWD-DIR (PSWD)

PASSWD-UID (PSWD)

PASSWD-USERNAME (PSWD)

PCLOSE (FD)

POPEN (FSPEC FLAGS)

SETGID (GID)

SETSID

SETUID (UID)

UMASK (MASK)

WAITPID (PID OPTION)

VARIABLE

Private

Undocumented

*O-APPEND*

*O-RDONLY*

*O-WRONLY*

*WNOHANG*

CONSTANT

Private

Undocumented

+DEFAULT-MASK+

+DEFAULT-MODE+