Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / Psh / Builtins / Exit.pm
CommitLineData
86530b38
AT
1package Psh::Builtins::Exit;
2
3=item * C<exit>
4
5Exit out of the shell.
6
7=cut
8
9#
10# TODO: What if a string is passed in?
11#
12
13sub bi_exit
14{
15 my $result = shift;
16 $result = 0 unless defined($result) && $result;
17
18 my $file= Psh::OS::catfile(Psh::OS::get_home_dir(),".${Psh::bin}_logout");
19 if( -r $file) {
20 process_file(abs_path($file));
21 }
22
23 Psh::OS::exit_psh($result);
24}
25
261;