[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]![]() |
![]() |
![]() |
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
![]() |
![]() |
![]() |
Hans Schou wrote: > select RBITS, WBITS, EBITS, TIMEOUT Tak for sparket i den rigtige retning! Jeg fik det til at virke med følgende kode, det krævede godt nok en hel del eksperimenteren. Brugen af <STDIN> er vist ikke helt rent i kanten, da den mixer rå access (select) med perls buffered IO. #!/usr/bin/perl $wait=0.5; $rin=''; vec($rin,fileno(STDIN) ,1)=1; $tick=0; while (42==42) { $nfound=select($rout=$rin,undef,undef,0); if ($nfound) #process input { $_=<STDIN>; chomp; print "$tick:$_\n"; } else #run background { } $tick++; select(undef,undef,undef,$wait); } -- Mvh. Carsten Svaneborg http://gauss.ffii.org
![]() |
![]() |
![]() |
||||||||||||
|
||||||||||||||
![]() | ||||||||||||||
|
||||||||||||||
![]() |
![]() |
![]() |