jaco has asked for the wisdom of the Perl Monks concerning the following question:
the problem arrises when moving it to one specific machine. it works flawlessly on all but one. the version of perl is slightly different (rpm packs 5.6.0-12, *-17). works on 12 not 17.open($fhname, "+<$devname") || die "cannot open serial device $dev +name $!\n"; $device->{fd} = fileno($fhname); select((select($fhname), $| = 1)[0]); print STDOUT "it got selected\n"; $fd = fileno($fhname); $tio = new POSIX::Termios; $tio->setispeed(B38400); $tio->setospeed(B38400); $tio->setiflag(IGNBRK|IGNPAR); $tio->setoflag(0); $tio->setlflag(0); $tio->setcflag(CS8|CLOCAL|CREAD|B38400); for (0 .. 16) { $tio->setcc($_, 0); } $tio->setcc(VMIN, 1); $tio->setcc(VTIME, 1); $tio->setattr($fd) || warn "Can't set attributes on $devname: $!\n +";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: tty hangs on open
by Anonymous Monk on Feb 13, 2002 at 04:15 UTC | |
|
Re: tty hangs on open
by jaco (Pilgrim) on Feb 13, 2002 at 06:33 UTC |