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

  • Home
  • SEARCH
  • 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 6588437
In Process

The Archive Base Latest Questions

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

To debug external process handling by Emacs I need wrapper which log all message

  • 0

To debug external process handling by Emacs I need wrapper which log all message flow.

So Emacs send string to wrapper stdin, wrapper log it and send to external process. Then back external process send output, wrapper log in and send to Emacs.

My Expect knowlage is small so I ask question. May be already exist standard tools for this purpose?

How to implement a stdin, stdout wrapper? is not answer to my question!!

  • 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:02:54+00:00Added an answer on May 25, 2026 at 5:02 pm

    This example make that I wand but in limited form (terminal configured in canonical mode, so some char code don’t allowed):

    #!/usr/bin/env expect
    
    set in [open in.log w]
    set out [open out.log w]
    
    log_user 0
    set stty_init {-echo}
    exp_internal 1
    
    # spawn sort
    spawn /bin/prog
    set proc_id $spawn_id
    
    expect {
        -i $user_spawn_id -re . {
            puts -nonewline $in $expect_out(buffer)
            send -i $proc_id $expect_out(buffer)
            exp_continue
        } eof {
            send -i $proc_id \x04
            sleep 1
            send -i $proc_id \x04
            expect -i $proc_id -re . {
                puts -nonewline $out $expect_out(buffer)
                send_user $expect_out(buffer)
                exp_continue
            } eof { }
        }
        -i $proc_id -re . {
            puts -nonewline $out $expect_out(buffer)
            send_user $expect_out(buffer)
            exp_continue
        } eof { }
    }
    wait
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I attempt to debug a external process with Eclipse CDT, I'm able to
Debug HTTP is easy, you have all sort of tools to do it (like
Can we Debug Xaml in WPF? Is there any external tool or VS plugin
Which tool can I use to see the call stack for a running process?
i have a c# dll which is written to act as a wrapper to
I'm getting external allocation too large for this process errors in my app. Lots
I have an external library which has a method which performs a long running
I have a load of XSLT from a third party which i need to
How can I use Eclipse to debug a (C/C++) console program running external from
In the debug properties of my c# project I have selected Start External Program

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.