Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#210 NppExec C executing bug

closed
nobody
NppExec (13)
9
2013-01-16
2012-11-06
Anonymous
No

Hello, I have noticed that NppExec sometimes executes incorrectly. Take the following example (see image attachment). The program is designed to output a message, input a number then output that number.

Discussion


  • Anonymous
    2012-11-06

    Screenshots of the bug

     
    Attachments

  • Anonymous
    2012-11-06

    • labels: --> NppExec
     

  • Anonymous
    2012-11-08

    • priority: 5 --> 9
     
  • DV
    DV
    2013-01-16

    This is a known issue. Refer to NppExec Manual, section 4.5: "no output may be shown until child process ends (if this child process performs a lot of operations without explicit flushing of its output)".
    The solution: use fflush() explicitly after your output. I.e.:
    printf("Enter a number: "); fflush(stdout);

     
  • DV
    DV
    2013-01-16

    Caused by "NppExec uses pipes to redirect child process'es output to NppExec's Console window" because of internal caching inside pipes that is out of NppExec's control.

     
  • DV
    DV
    2013-01-16

    • status: open --> closed