Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7974981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:31:38+00:00 2026-06-04T08:31:38+00:00

Our application has tcl embedded in it and by using starkit ; tk is

  • 0

Our application has tcl embedded in it and by usingstarkit; tk is statically linked into it.

When I run the application, gui comes up and responds to all keys but when I hit ctrl+d to terminate it hangs. I have given the back trace of the hang at the end of the post.

First let me describe how we are embedding Tcl/Tk in our application.

#--------------------------------------------------------------
# (*) install ActiveTcl
# we need starkit and ActiveTcl tclsh is batteries included
#--------------------------------------------------------------
% tar -xzf ActiveTcl8.5.8.1.291945-linux-x86_64-threaded.tar.gz
% cd ActiveTcl8.5.8.1.291945-linux-x86_64-threaded
# specify /a/b/tcltk8.5.8/linux26_x86_64 as install dir in gui
% ./install.sh

We need tk without true type fonts since it was crashing the application. To install tk from sources we need tcl compiled: (I do not know how to compile tk with --with-tcl pointing to Active-Tcl directory. If there is an option please let me know)

#--------------------------------------------------------------
# (*) install tcl from sources
#--------------------------------------------------------------
% tar -xzf tcl8.5.8-src.tar.gz 
% cd tcl8.5.8/unix
% ./configure --prefix=/a/b/tcltk8.5.8/linux26_x86_64 \
              --enable-shared=no \
              --enable-threads 
% gmake

NO gmake install for this tcl since we need to retain tclsh of ActiveTcl. Next install tk.

#--------------------------------------------------------------
# (*) install tk from sources
# need to disable xft (true type font) set --disable-xft
#--------------------------------------------------------------
% tar -xzf tk8.5.8-src.tar.gz 
% cd tk8.5.8/unix
% ./configure --prefix=/a/b/tcltk8.5.8/linux26_x86_64 \
              --enable-shared=no \
              --with-tcl=/a/b/tcltk8.5.8/src/tcl8.5.8/unix \
              --disable-xft \ 
              --enable-threads
% gmake
% gmake install

Now I am run my application using gdb:

% gdb rs
% r -gui

I hit ctrl+d which causes the hang and it gives the following back trace. Can someone help me fix this problem?

Program received signal SIGINT, Interrupt.
[Switching to Thread 182897358720 (LWP 9535)]
0x0000003739608b3a in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib64/tls/libpthread.so.0
(gdb) bt
#0  0x0000003739608b3a in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib64/tls/libpthread.so.0
#1  0x0000000001833e22 in Tcl_ConditionWait ()
#2  0x0000000001834d41 in Tcl_WaitForEvent ()
#3  0x00000000017fec68 in Tcl_DoOneEvent ()
#4  0x00000000017cb4ad in Tcl_VwaitObjCmd ()
#5  0x000000000178b6ec in TclEvalObjvInternal ()
#6  0x00000000017cd08d in TclExecuteByteCode ()
#7  0x00000000017d5798 in TclCompEvalObj ()
#8  0x000000000178d6ac in TclEvalObjEx ()
#9  0x00000000017939c4 in Tcl_CatchObjCmd ()
#10 0x000000000178b6ec in TclEvalObjvInternal ()
#11 0x00000000017cd08d in TclExecuteByteCode ()
#12 0x00000000017d5a84 in Tcl_ExprObj ()
#13 0x000000000178c3e3 in Tcl_ExprBooleanObj ()
#14 0x0000000001796704 in Tcl_IfObjCmd ()
#15 0x000000000178b6ec in TclEvalObjvInternal ()
#16 0x000000000178cee6 in TclEvalEx ()
#17 0x000000000178d616 in Tcl_EvalEx ()
#18 0x00000000017f1be9 in Tcl_FSEvalFileEx ()
#19 0x000000000179c385 in Tcl_SourceObjCmd ()
#20 0x000000000178b6ec in TclEvalObjvInternal ()
#21 0x000000000178cee6 in TclEvalEx ()
---Type <return> to continue, or q <return> to quit---
#22 0x000000000178d616 in Tcl_EvalEx ()
#23 0x000000000178d9d8 in TclEvalObjEx ()
#24 0x000000000180d45f in Tcl_UplevelObjCmd ()
#25 0x000000000178b6ec in TclEvalObjvInternal ()
#26 0x00000000017cd08d in TclExecuteByteCode ()
#27 0x000000000180e4cd in TclObjInterpProcCore ()
#28 0x000000000178b6ec in TclEvalObjvInternal ()
#29 0x000000000178cee6 in TclEvalEx ()
#30 0x000000000178d616 in Tcl_EvalEx ()
#31 0x000000000178dacd in Tcl_Eval ()
#32 0x00000000008f26aa in xrAppPlatformInit (interp=0x211a410)
    at xrAppPlatform.c:430
#33 0x00000000017f69ca in Tcl_Main ()
#34 0x00000000008f2153 in xrMain (argc=3, argv=0x20fe880)
    at xrAppPlatform.c:177
#35 0x00000000008f1092 in main (argc=2, argv=0x7fbfffe718) at main.cpp:213
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:31:39+00:00Added an answer on June 4, 2026 at 8:31 am

    Well, the Ctrl+D is interpreted by the terminal as an EOF indicator, which means that the stdin channel (at the Tcl level) will now be in an EOF state. The question then is how is your code going to be responding to that. It’s very hard to say anything generic there, as you can write Tcl code to completely customize that sort of thing.

    However, I see (from your stack trace) that you have a vwait in use (i.e., a custom event loop). I guess that the problem is therefore that your code isn’t reacting to the EOF correctly and either using exit or causing the loop to terminate. To detect this, you need to set a readable fileevent on stdin which tries to read from that channel (so far so normal); if the read fails, check for EOF with eof and take appropriate action…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our application has distribution functionality. It takes several Excel 2007 spreadsheets, copies them into
Our application has a service layer and a DAO layer, written as Spring beans.
Our application has many controls that are created dynamically. For example, a navigation pane
Our application has a couple of shell scripts that are called from web-based Oracle
Our Java application has a number of modules which implement a common interface. By
I'm currently going through the process of running FxCop through our application that has
I have a Windows application. The windows application has our XML Library on it.
In our application through the process of developing a lot of JAR files has
Our large application (VB.Net, Framework 3.5) has been developed more or less from the
My company has a ClickOnce application that has been in use with our customers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.