New console

[email protected] (John Serink)
Newsgroups perl.ithreads
Message-ID <[email protected]>
Ok, I want a new thread I am creating to be in its own tty console.
My example code:
use strict;
use warnings;
use threads;
use threads::shared;

my $var : shared;
$var=1;

my $thr = threads->new(\&sub1);
print ("Var is $var\n");
$thr->join();
print ("Var is $var\n");

sub sub1 {
	$var++;
# This print statement I want to be in its own console.
	print("Inside thread\n");
	sleep(2);
	return;
}

Any suggestions? I thought it would be easy but it turns on not to be. I 
have tried this with fork and can't get that going either.

Cheers,
John
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.