Next: Service Examples, Previous: Service Convenience, Up: Services [Contents][Index]
All of the procedures listed below return procedures generated from the supplied arguments. These procedures take one argument in the case of destructors and no arguments in the case of constructors.
The returned procedure will execute command in a shell and
return #t
if execution was successful, otherwise #f
.
For convenience, it takes multiple arguments which will be
concatenated first.
Similar to make-system-constructor
, but returns #f
if
execution of the command was successful, #t
if not.
Return a procedure that forks a child process, close all file
descriptors except the standard output and standard error descriptors,
sets the current directory to directory, changes the environment
to environment-variables (using the environ
procedure), and
executes command (a list of strings.) Return the PID of the child
process.
Returns a procedure that sends signal to the pid which it takes
as argument. This does work together with respawning services,
because in that case the stop
method of the <service>
class sets the running
slot to #f
before actually
calling the destructor; if it would not do that, killing the process
in the destructor would immediately respawn the service.
The make-forkexec-constructor
procedure builds upon the following
procedures.
Run command as the current process from directory, and with
environment-variables (a list of strings like "PATH=/bin"
.)
File descriptors 1 and 2 are kept as is, whereas file descriptor 0
(standard input) points to /dev/null; all other file descriptors
are closed prior to yielding control to command.
fork+exec-command
does the same, but in a separate process whose
PID it returns.
Next: Service Examples, Previous: Service Convenience, Up: Services [Contents][Index]