in reply to Re: Sync messages for chatting peers
in thread Sync messages for chatting peers
To Almut:
Thanks for pointing out the problem. I am trying to solve it as you explained. But it seems that Term::ReadKey module non-blocking readline feature is NOT well supported in Windows either.
To rowdog:
Yes, I read the doc, unforturnely, my script works under windows, but fork() is NOT well supported in Wins. I tested it under both Ubuntu and Windows XP with the same code.In Linux, it works fine, while screen update still hangs at reading input, requires <enter> key to trigger the update.#!/usr/bin/perl my $i = 0; my $in; while( 1 ){ ++$i; my $pid = fork(); if ( $pid ){ $in = <>; chomp( $in ); print "Child: $in\n"; } else{ print "Parent: $i \n"; sleep 5; } }
Thanks,
Yun
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Sync messages for chatting peers
by rowdog (Curate) on Mar 25, 2010 at 20:05 UTC | |
by kzle (Novice) on Mar 26, 2010 at 02:14 UTC |