MERVBot script

From ASSS Wiki
Revision as of 17:37, 29 September 2007 by CypherJF (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Below is a Perl script for running MERVBot under Wine on Linux.

#!/usr/bin/perl -w
#Zim: http://forums.minegoboom.com/viewtopic.php?p=34608#34608

use strict;
use warnings;

my $pid;

if ($pid = fork)
{
  #parent
}
else
{
die "CANNOT FORK!!\n" unless defined $pid;
open(STDIN, "/dev/tty1");  # get it a real tty for input
open(STDOUT, "/dev/null"); # suppress output
open(STDERR, "/dev/null"); # suppress output
{
  system("wineconsole /home/MERVBot/MERVBot.exe");
};
exit(1);
}