Tcl Source Code

View Ticket
Login
Ticket UUID: 3551313
Title: Cygwin file exists failure
Type: Bug Created on: 2012-07-29 11:45:39
Submitter: lloydwood Assigned to: aku
Subsystem: 37. File System Severity: Minor
Priority: 5 Medium Last modified: 2013-09-24 22:07:55
Status: Closed Closed by: dkf
Resolution: Out of Date Closed on: 2013-09-24 22:07:55
Version: obsolete: 8.5.11
Description:
Using 8.5.11 Cygwin package on Win7 64-bit; Cygwin recently moved from Insight Tcl/Tk 8.4,

I'm able to hang it by asking about non-existent files/directories on the filesystem:

$ tclsh
% set a [file exists /cygdrive ]
1
% set a [file exists /cygdrive2 ]
(hangs, must ctrl-c, should report 0)


$ tclsh
% set a [file exists /gffg ]
(hangs, must ctrl-c, should report 0)


$ tclsh
% set a [file exists /bin ]
1
% set a [file exists /usr ]
1
% set a [file exists /banana ]
0
% set a [file exists /gffg ]
(hangs, must ctrl-c, should report 0)

aim of using file exists /cygdrive was to reliably detect Cygwin, as 
    } elseif {[string equal [tk windowingsystem] win32]} {
      # Tcl on Windows - grey
is no longer reliable, as it returns X11.

and I'm also seeing some Tk oddities with e.g. inconsistent tiling of PhotoImages and abutting edges in my app that aren't present on other platforms (and haven't been in over a decade of cross-platform maintenance).
User Comments:
nijtmans added on 2012-07-29 21:38:22:
Tried the same with a Cygwin build of
tclsh8.5.12. (Official package not available
yet, but built from sources):
$ tclsh8.5
% info patchlevel
8.5.12
% set a [file exists /cygdrive ]
1
% set a [file exists /cygdrive2 ]
0
% set a [file exists /gffg ]
0
%

So it looks like this is fixed in 8.5.12. Therefore, modifying
the Group and the Resolution to "Out of Date". Please
wait for the new Cygwin package to become available.
If this still turns out to be not-working then, it might be
a problem in the way the Cygwin package is built.
Anyway, feel free to re-open this issue, changing
the Group to "8.5.12"

For the other issues, chances are that they are
fixed in 8.5.12 as well: It contains many
fixes related to Cygwin. So, please, wait
for the new Cygwin package, and if it
is still a problem report it here (for Tcl)
or in "tktoolkit" (for Tk-related bugs)

Thanks!