equal
deleted
inserted
replaced
|
1 #!/usr/bin/ruby |
|
2 # |
|
3 # Example jail_attach usage |
|
4 # |
|
5 # == Synopsis |
|
6 # |
|
7 # |
|
8 # |
|
9 # == Authors |
|
10 # |
|
11 # * Michael Granger <ged@FaerieMUD.org> |
|
12 # |
|
13 # == Copyright |
|
14 # |
|
15 # Copyright (c) 2006 The FaerieMUD Consortium. Some rights reserved. |
|
16 # |
|
17 # This work is licensed under the Creative Commons Attribution License. To view |
|
18 # a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or |
|
19 # send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California |
|
20 # 94305, USA. |
|
21 # |
|
22 # == Version |
|
23 # |
|
24 # $Id$ |
|
25 # |
|
26 |
|
27 require 'bsdjail' |
|
28 |
|
29 # With a block, does a fork() then a jail_attach() from the child |
|
30 pid = BSDJail.attach( jid ) do |
|
31 puts "I'm a child process in jail!" |
|
32 |
|
33 |
|
34 end |
|
35 |
|
36 |