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 6591631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:26:58+00:00 2026-05-25T17:26:58+00:00

Link to the example… on wiki.tcl.tk There is an example here for extending tcl

  • 0

Link to the example… on wiki.tcl.tk

There is an example here for extending tcl through the use of an executable module that communicates through pipes. (Located in the section marked Executable Modules (EM))

I have compiled the program using Ubuntu and Windows XP. When I try to run the script that tests the modules – they both hang.

Whats missing from the example?

  • 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-05-25T17:26:58+00:00Added an answer on May 25, 2026 at 5:26 pm

    Looks like the example is missing out handling of flushing of the output side of the pipes. The data’s being buffered up in OS buffers (waiting for a few kilobytes to be built up) instead of actually being sent immediately to the other process. Note that this buffering only happens when the output is being directed to something other than a terminal, so you won’t see it when interactively testing. (Its also not important if lots of data is being written, when the improved efficiency of having that buffering is a winner.)

    On the C side, add this line at the top of the main function:

    setvbuf(stdout, NULL, _IONBF, 0);
    

    On the Tcl side, add this immediately after the starting of the subprogram:

    fconfigure $mathModule -buffering none
    

    The C side can be also done by using fflush after every printf. If you’re stuck with a real C program that you don’t have access to the source of, you can still make progress by wrapping the the whole program with the unbuffer program (actually a Tcl script that uses magic with Expect to make the subprocess think it’s talking to a terminal). The one down-side of unbuffer is that it uses a virtual terminal, which comes from a far more restricted pool of resources than plain old process IDs (let alone pipes/file descriptors).

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

Sidebar

Related Questions

here is link to an example: http://techchorus.net/demos/jquery/hiding-input-elements-in-a-div.html It actally disables few elements on click
Does anyone have an example (code or a link) that will allow me to
Do you have any link\example of Greasemonkey script with Jquery that works in Google
I have done this Example for implementation of the WebView. here is the link
The link example is here: http://jsfiddle.net/fxr5p/ How to make if value is empty, onload
Need something simulat jcrop plucgin (link to example is here: http://publikz.com/one-more-task-rounded-selection-in-jquery/ ) but with
I have this problem with CSS round corners. The link to example is here:
can you write javascript that produces/writes/etc. functioning javascript? for example, have a link that
I have one link example <a href=xyz.html target=_blank>Click Here</a> When ever i clicks on
pypy has many built-in function use python implementation.example: link but,i can't find model 'sys'

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.