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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:06:02+00:00 2026-05-27T06:06:02+00:00

The scenario is the following (no code available yet): A linux process runs forever

  • 0

The scenario is the following (no code available yet): A linux process runs forever in while(1) loop. The process is implemented in C/C++ (POSIX). The process keeps some data to a std::vector.

myvector.push_back("test1");
myvector.push_back("test1");
myvector.pop_back();
myvector.push_back("test1");

The process runs and modifies the vector. I am looking for a mechanism that will print the vector values when executing the binary with a specific command line argument.

Let’s say that the process called “myprocess” and is running. I want to execute the same binary from a new shell like ./myprocess -debug and print the values of the STL container.

Any idea? What is the best mechanism to do it (ie print the memory of another process)

  • 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-27T06:06:02+00:00Added an answer on May 27, 2026 at 6:06 am

    Typically, you don’t “print the memory of another process”. What you do is send the other process a signal asking it to print out the contents of the vector.

    For this, you could use a POSIX signal (e.g. SIGUSR1).

    A more flexible approach would be for the process to listen on a named pipe (or a TCP port) and accept commands over it. One such command could be to print out the contents of the vector.

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

Sidebar

Related Questions

Where is the proper place to perform validation given the following scenario/code below: In
Let's consider the following scenario: a function which can generate code colors from white
I have the following scenario. The client code only has access to FooHandler, not
I have the following scenario. I have a combobox where multiple selection is available.
Scenario: I try to post a video to YouTube with the following code: YouTubeEntry
While migrating some code to the latest version of F#, included in VS2010 b1,
I was going through some code and came across a scenario where my combobox
What will be the Javascript or JQuery code for following scenario ? A ABA
I have a problem with the following scenario (code cut for brevity). Basically the
Scenario Consider the following code snippet. string s = S; string s1 = S;

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.