75 |
write_file( $code->name, $code->source ); |
write_file( $code->name, $code->source ); |
76 |
chmod 0700, $code->name; |
chmod 0700, $code->name; |
77 |
my $cmd = './' . $code->name; |
my $cmd = './' . $code->name; |
78 |
|
my $message = '$ <a href="/edit?id=' . $code->id . '">' . $code->name . '</a>'; |
79 |
|
|
80 |
if ( $input->content ) { |
if ( $input->content ) { |
81 |
write_file( $input->name, $input->content ); |
write_file( $input->name, $input->content ); |
82 |
$cmd .= ' ' . $input->name; |
$cmd .= ' ' . $input->name; |
83 |
|
$message .= ' ' . $input->name; |
84 |
$self->result->content( input => $input->content ); |
$self->result->content( input => $input->content ); |
85 |
} |
} |
86 |
|
|
88 |
$output =~ s/^Can't ignore signal CHLD, forcing to default\.\n//s; |
$output =~ s/^Can't ignore signal CHLD, forcing to default\.\n//s; |
89 |
$self->result->content( output => $output ); |
$self->result->content( output => $output ); |
90 |
|
|
|
my $message = '$ ' . $cmd; |
|
|
|
|
91 |
#warn "$message\n$output\n"; |
#warn "$message\n$output\n"; |
92 |
|
|
93 |
chdir( $cwd ) || die "can't return to $cwd"; |
chdir( $cwd ) || die "can't return to $cwd"; |