docs/example.rb
author Michael Granger <ged@FaerieMUD.org>
Fri, 15 Aug 2008 16:23:03 +0000
changeset 1 09d0d209d06d
parent 0 92d00ff32c56
permissions -rw-r--r--
Added some stuff to the mkrf monkeypatch to log output from the header/library tests to the mkrf.log instead of /dev/null.

#!/usr/bin/ruby
# 
# Example jail_attach usage
# 
# == Synopsis
# 
#   
# 
# == Authors
# 
# * Michael Granger <ged@FaerieMUD.org>
# 
# == Copyright
#
# Copyright (c) 2006 The FaerieMUD Consortium. Some rights reserved.
# 
# This work is licensed under the Creative Commons Attribution License. To view
# a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or
# send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
# 94305, USA.
# 
# == Version
#
#  $Id$
# 

require 'bsdjail'

# With a block, does a fork() then a jail_attach() from the child
pid = BSDJail.attach( jid ) do
	puts "I'm a child process in jail!"
	
	
end