Bug 42630 - fconfigure doesn't recognize -mode switch
fconfigure doesn't recognize -mode switch
Status: CLOSED DUPLICATE of bug 22187
Product: Red Hat Linux
Classification: Retired
Component: tcltk (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-28 18:50 EDT by Daryll
Modified: 2007-04-18 12:33 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-06-27 14:30:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Daryll 2001-05-28 18:50:34 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
The fconfigure command is not accepting the -mode option. It reports that
the option isn't supported. This is used to setup serial line parameters in
tcl scripts. 

How reproducible:
Always

Steps to Reproduce:
This code from gpsman package:

proc OpenSerialFailed {baud} {
    # open serial port at given baud rate, and log file if needs be
    # return 1 on failure
    global MESS SRLFILE SERIALPORT InBuff Polling Eof tcl_platform \
	    NotLogging LogFile SERIALLOG

    if { [catch "set SRLFILE [open $SERIALPORT r+]"] } {
	GMMessage [format $MESS(badserial) $SERIALPORT]
	return 1
    }
    switch $tcl_platform(platform) {
	unix {
	    set Polling 0 ; set InBuff ""
	    fconfigure $SRLFILE -blocking 0 -mode $baud,n,8,1 \
		    -translation binary
	    fileevent $SRLFILE readable ReadChar
	}
	windows {
	    # Tcl/Tk 8.0p2 does not support I/O from/to serial ports
	    set Polling 1 ; set InBuff ""
	    fconfigure $SRLFILE -blocking 0 -mode $baud,n,8,1 \
		    -translation binary
	    after 0 ReadChar
	}
	default {
	    GMMessage $MESS(badplatform)
	    return 1
	}
    }
    set Eof 0
    if {! $NotLogging && "$LogFile" == "" } { set LogFile [open $SERIALLOG
w] }
    return 0
}

	

Additional info:

My understanding is that there is a unix capabilities option to compile tcl
that isn't set. 
I read on a newsgroup that this is fixed in Mandrake's tcltk package.
Comment 1 Anne Possoz 2001-06-27 14:30:48 EDT
This is the same as bug 22187 (raised in redhat 7.0)

The solution is still the same:

Rebuild it
rpm --rebuild /net/zzz/SRPMS/tcltk-8.3.1-53.src.rpm

and replace it:
rpm -ivh --replacefiles --replacepkgs /usr/src/redhat/RPMS/i386/tcl-8.3.1-53.rpm

I guess the Additional comments from max@suse.de 2001-03-08 11:45:19 (bug 22187)
is still valid.
Comment 2 Eido Inoue 2001-06-28 10:36:01 EDT

*** This bug has been marked as a duplicate of 22187 ***

Note You need to log in before you can comment on or make changes to this bug.