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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:41:06+00:00 2026-05-26T09:41:06+00:00

Extened question from In multi thread application how can i redirect stderr & stdout

  • 0

Extened question from In multi thread application how can i redirect stderr & stdout in separate file as per thread?

see some how i want to keep all printf and error/warning message produced in each thread in different log-file.

FILE * freopen ( const char * filename, const char * mode, FILE * stream ); 

freopen function redirects 3rd argument stream into 1st argument file name. So now i want to ask you in multi-theread application can i do that with help of freopen()… how?

  • 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-26T09:41:06+00:00Added an answer on May 26, 2026 at 9:41 am

    Since all resources are shared in a threaded application, including files, changing stdin or stdout in one thread changes them for all threads. If you want to change it in just a single thread then use fork to create a new process instead.

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

Sidebar

Related Questions

This is an extended question from How can i remove this Segmentation fault in
This question is similar to How can I specifiy what access I need from
This is question about MVC web-app architecture, and how it can be extended to
Quick question: One can set the path where a cookie is valid, but is
From an out-of-process COM object (LocalServer32) can I determine the client process that requested
OK, so this is leading on from another question I asked here recently. Basically,
After what I learned from my previous question , I would like to use
Original question: Can someone tell me how to use slice lists and the ellipsis?
I retrieving data from a csv/txt file using oledb driver ConnString = Provider=Microsoft.Jet.OleDb.4.0; Data
From a previous question , I have the following: So I have implemented a

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.