199767f8919635c4928607450d9e0abb932109ceToomas Soome#! /bin/ksh
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomePOLICYDIR=/opt/ECSpooler/systrace-policy
199767f8919635c4928607450d9e0abb932109ceToomas SoomeINTERPRETER=/opt/sbcl-1.0.5/bin/sbcl
199767f8919635c4928607450d9e0abb932109ceToomas SoomeSBCL_HOME=${INTERPRETER%/bin/sbcl}/lib/sbcl; export SBCL_HOME
199767f8919635c4928607450d9e0abb932109ceToomas SoomeOPTIONS=" --noinform --disable-debugger --no-sysinit --no-userinit "
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Explanation of SBCL command-line flags in use:
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# --disable-debugger
199767f8919635c4928607450d9e0abb932109ceToomas Soome# By default, a Common Lisp system tries to ask the programmer for
199767f8919635c4928607450d9e0abb932109ceToomas Soome# help when it gets in trouble (by printing a debug prompt, then
199767f8919635c4928607450d9e0abb932109ceToomas Soome# listening, on *DEBUG-IO*). However, this is not useful behavior
199767f8919635c4928607450d9e0abb932109ceToomas Soome# for a system running with no programmer available, and this
199767f8919635c4928607450d9e0abb932109ceToomas Soome# option tries to set up more appropriate behavior for that
199767f8919635c4928607450d9e0abb932109ceToomas Soome# situation
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# --noinform
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Suppresses the startup banner text.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# --no-sysinit
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Don't load any system-wide initialization files.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# --no-userinit
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Don't load any user initialization file.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# --load file
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Loads file after SBCL starts.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# --eval "(quit)"
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Quit after executing the loaded file.
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soometrap 'kill $! && trap - TERM && kill $$' TERM
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomesystrace -a -d $POLICYDIR $INTERPRETER $OPTIONS --load "$@" --eval "(quit)" &
199767f8919635c4928607450d9e0abb932109ceToomas Soomewait %%
199767f8919635c4928607450d9e0abb932109ceToomas Soome