Results 1 to 4 of 4

Thread: force buffer dump

Hybrid View

  1. #1
    Join Date
    May 2007
    Beans
    121
    Distro
    Ubuntu 7.04 Feisty Fawn

    force buffer dump

    I made a program in C that has been running for like a day or so.
    It is about 30% complete and I would like to use the data it has calculated so far, but I forgot to use fflush to make it actually write the data to the files, so I only have a partially written file with my output, and a lot more on its buffer.

    Is there a way I can force it to write the data? some "kill" signal or something?

    Ideally I wouldn't like to kill the process, so I don't feel like I just wasted a day.

    TY!

  2. #2

    Re: force buffer dump

    If you reffer to the internal buffer used by stdio, then use fflush(FILE* f);

  3. #3
    Join Date
    May 2007
    Beans
    121
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: force buffer dump

    Quote Originally Posted by kknd View Post
    If you reffer to the internal buffer used by stdio, then use fflush(FILE* f);
    Yeah, I know, but i didn't, so, can I do something about an allready running process??

  4. #4

    Re: force buffer dump

    Ahh, sorry, I didn't read right the question.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •