f



Function 'system' nasty behaviour in Cygwin Perl/Tk

Hi All,

I've recently installed latest x-Cygwin on different PCs and suddenly
discovered strange reaction on 'system' function inside Perl/Tk apps.
Naturally, console applications running well with this function.
Below you can see my snippet code and stuff it prints.

FELIX-XP-~> cat test.pl
#!/usr/bin/perl

# Code automatically generated by VPTK_W

use strict;
use Tk;
use Tk::Button;

my $mw=MainWindow->new(-title=>'Bug demo');
my $w_Button_001 = $mw -> Button ( -background=>'green4',
-foreground=>'Yellow', -text=>'Exit', -command=>sub {exit} ) -> pack();
my $w_Button_002 = $mw -> Button ( -background, 'Yellow', -foreground,
'Black', -command, sub{system('echo Hello'=>'')},  -text, 'Magic 0' )
-> pack();
my $w_Button_003 = $mw -> Button ( -background, 'Red', -foreground,
'Yellow', -command, sub{system('xterm'=>'')}, -text, 'Magic 1' ) ->
pack();
MainLoop;

#===vptk end===< DO NOT CODE ABOVE THIS LINE >===
FELIX-XP-~> test.pl
C:\cygwin\bin\perl.exe (3064): *** unable to remap
C:\cygwin\bin\cygz.dll to same address as parent(0xE00000) != 0xE10000
      9 [main] perl 2168 fork_parent: child 3064 died waiting for dll
loading
Background Error: panic: MUTEX_LOCK (45) [op.c:354] at
/usr/lib/perl5/vendor_perl/5.8/cygwin/Tk.pm line 406.
panic: MUTEX_LOCK (45) [op.c:354].

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Any help/suggestion will be highly appreciated,

Felix.

0
felix
12/28/2005 8:25:28 AM
comp.lang.perl.tk 4721 articles. 0 followers. pharrendorf (19) is leader. Post Follow

1 Replies
447 Views

Similar Articles

[PageSpeed] 20

Hello anybody!

Looks like combination of Cygwin + Perl/Tk isn't so popular here...
Anyway, maybe somebody from Perl/Tk maintaners could take a look.

Version information:

FELIX-XP-~> uname -a
CYGWIN_NT-5.1 FELIX-XP 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown
unknown Cygwin

FELIX-XP-~> perl -v | head -3

This is perl, v5.8.7 built for cygwin-thread-multi-64int

FELIX-XP-~> perl -MTk -e 'print "$Tk::VERSION $Tk::version\n"'
804.027 8.4

0
felix
1/10/2006 9:58:22 AM
Reply:

Similar Artilces:

w2ksp4 cygwin Perl/Tk 'cpan -i Tk' fails
Hello, world! I have a W2K SP4 box with a fresh install of Cygwin, and would like to use Perl/Tk. When I attempt to install the Tk module using cpan: dpchrist@w2k30g:~$ cpan -i Tk CPAN: Storable loaded ok Going to read /home/dpchrist/.cpan/Metadata Database was generated on Sat, 13 Sep 2003 12:45:46 GMT Running install for module Tk ... Failed Test Stat Wstat Total Fail Failed List of Failed -------------------------------------------------------------------- ----------- t/cursor.t 255 65280 1 1 100.00% 1 t/entry.t ...

Can't get passed 'use tk;' in my 1st perl/tk program.
I'm trying to run my 1st perl/tk program and can't get passed the "use Tk;" command. I get error, "Can't locate Tk.pm" and if I add a "use lib" pointer to directory containing Tk.pm, I get error message "Can't locate loadable object for module Tk::Event". SEE BELOW for actual scripts and error messages. Environment: Mac OS x 10.3.8; perl version 5.8.1; Tk directory Tk-804.027. Experince level: Used to write lots of perl code, 15 years ago on Sun/unix. Just wrote my 1st perl code on MAC. This is my first try at pe...

handling perl string containing '@' and '$' with system function
If I had a perl string $newpw which is inputed by a user and it may contain special characters such as '@' and '$' (e.g. "5a@Wf7$X"). How to pass it to the system function properly? This does not work: system("/usr/local/bin/acthw -pw \"$newpw\""); __________________ wong_powah@yahoo.ca wrote in news:638c7b6c-b259-4438-84c5- 3ec7fff60cef@j44g2000hsj.googlegroups.com: > If I had a perl string $newpw which is inputed by a user and it may > contain special characters such as '@' and '$' (e.g. "5a@Wf7$X"). How > t...

Perl/Tk: can't get -command=> \&function to work 'on-the-fly'!!
Please Help! I am trying to define buttons 'on-the-fly' mostly because their number is determined in a config file - I don't know how many I will need. It's ROYALLY NOT WORKING. I think Tk.pm is having issues. And it's all driving me very... verrrryyy... batty. *** I WANT THIS TO WORK *** (pseudo-code) for i=1;i<100,i++ { $handle[i] = menubar->command(-label => "test_i", %somecolors, -command => Move2Folder(i)); *** IS THIS TOO MUCH TO ASK??? *** 1) If I 'unroll it' (see end of this message) AND wrap the Move2Folder function...

[Tk] grid manager with '-', 'x', '^'
Just curious about special char with grid manager: On Tcl/Tk: grid .a - - grid ^ .b x This first line of TCL could translate on Ruby/Tk as: Tk.grid a, '-', '-' # a.path == '.a' There is no way to tranlate the second line without using any :row, :column, :rowspan, coloumnspan. Because TkGrid.configure want the first parameter is *win*. So, grid manager with relative placement on Ruby/Tk works only when the "first" is *win*. Is this right or do we have other trick for it ? Thanks. Hi! email55555 email55555 wrote: > > Just curious about special...

[tk] Equivalent to Perl's Tk::Tiler?
Hi All: I making arbitrarily large forms and in doing similar in Perl, I've used Tk::Tiler, a scrollable frame. I'd just pack my various entries into the form, and set a max size, from which the form would automatically scroll if the contents were larger than the form size. I've found a scrollable canvas sample I could use, but worry about the of resources it might take up. Any pointers? Thanks. Forrest From: Forrest Chang <fkc_email-news@yahoo.com> Subject: [tk] Equivalent to Perl's Tk::Tiler? Date: Tue, 6 Dec 2005 02:17:33 +0900 Message-ID: <81lkyz79...

Perl/Tk problem with pack()
Hello. I want to give a widget a new master! What are my possibilities on this? I tried to do this with the in-option from the packer pack() like this way: #!perl -w use strict; use Tk; my $mw = new MainWindow; my $f1 = $mw->Frame; my $f2 = $f1->Frame; $f2->pack(-in => $mw); MainLoop; I get the error: can't pack .frame.frame inside . at ... Please help me! Erik tschinke <e.tschi@web.de> writes in article %: > Hello. > I want to give a widget a new master! > What are my possibilities on this? > > I tried to do this w...

Re: What's new in Tk 8.4 for Perl/Tk
Revised: http://www.lehigh.edu/~sol0/ptk/whats-new.html -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to majordomo@lists.stanford.edu ...

A function with 'and' , 'not' , 'null' , 'car' and 'cdr'
What's this ? (defun enigma (x) (and (not (null x)) (or (null (car x)) (enigma (cdr x))))) "I suppose I should learn Lisp, but it seems so foreign." - Paul Graham, Nov 1983 On Wed, Oct 07 2015, CAI GENGYANG wrote: > What's this ? > > > (defun enigma (x) > (and (not (null x)) > (or (null (car x)) > (enigma (cdr x))))) Bad taste? It returns T if the list X contains nil as an element. It would be clearer to write (some #'null x). Helmut CAI GENGYANG ...

PERL to mean what 'perldoc perl' says is wrong? (was: Re: perl should be improved and perl6)
Jim Cochrane wrote: > On 2008-04-14, Chris Mattern <syscjm@sumire.gwu.edu> wrote: >> On 2008-04-14, Jim Cochrane <allergic-to-spam@no-spam-allowed.org> >> wrote: <snip> >>> >>> Actually, "I should of course said" is still wrong - missing a verb >>> component - should be: "I should of course have said". >>> >> I think that sentence is also better for a little appropriate >> punctuation: "I should, of course, have said". The commas also help >> guide you to the correct verb choic...

'require'ing globals without 'used only once' complaints from 'perl -w'?
I'm trying to figure out a way to load global variables using 'require' with 'perl -w' enabled, but without getting "<varname> used only once" errors. The only "solution" I've seen is to make sure all globals are referenced more than once, but that gets hard to manage when you scale up the project. My situation is a project of cgi-bin scripts, where there are several scripts all wanting to load global settings from a single 'config.pl' file. My current way of doing things is to make a 'config.pl' file that has the glo...

Linux Perl-TK -> Win32 Perl-Tk
I've got an app that I wrote in Perl-Tk for Linux (Redhat) that I would like to run on my Win32 laptop. I am not interested in dual-booting this laptop but would like to get the app up an running. I'm a perl-Tk hack at best. What is the best/easiest way to port the application? thanks, Mike On Tue, 21 Dec 2004 03:01:21 +0000, Michael Seningen wrote: > I've got an app that I wrote in Perl-Tk for Linux (Redhat) that I would > like to run on my Win32 laptop. > > I am not interested in dual-booting this laptop but would like to get > the ap...

Perl/Tk: 'selection conversion left too many bytes unconverted' error on large text selection
Hi all, I've written about this before, but it's come back and I still haven't found what the problem is. Basically, in Perl/Tk if a textbox has a lot of text in it (no idea on the limit yet - all I know is that it has to be a _lot_ of text), and all the text is selected (and therefore copied to the clipboard) the entire perl process is halted, the gui disappears and the error: selection conversion left too many bytes unconverted appears on the command line. This appears to be a tcl panic error (hence the cross-post to comp.lang.tcl as I'm not sure where the problem i...

Solution [ Perl/Tk: 'selection conversion left too many bytes unconverted' error on large text selection ]
After I got bitten enough by this error and found no solution on the web I had to debug it myself. For me it looks like the following: - text get selected from Tk::Text - TkSelPropProc in ./pTk/mTk/unix/tkUnixSelect.c gets called to handle the selection which determines that the display supports utf-8 and thus gets Encoding::utf8 as the responsable encoder (see Encode::Encoding for the interface) - then it calls Tcl_UtfToExternal to convert the selection from internal format to utf8, this function is defined in encGlue.c and just calls CallEncode in the same fil...

Web resources about - Function 'system' nasty behaviour in Cygwin Perl/Tk - comp.lang.perl.tk

Resources last updated: 2/6/2016 4:48:56 AM