Eina log: flush stderr on mintty-based terminals submit/tizen/20200719.223823
authorVincent Torri <vincent.torri@gmail.com>
Sun, 19 Jul 2020 17:27:49 +0000 (18:27 +0100)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 19 Jul 2020 22:15:32 +0000 (07:15 +0900)
commit505bc234167f1ca64c1c857b324a4615bff29c65
tree8fadf7cd38fd88fc9cbe75fcfd9a524a5999503f
parent2a81fb34fa9c15cf5cd8fd4a1a64791990e2f4c1
Eina log: flush stderr on mintty-based terminals

Summary: on those terminal, stderr is never flushed, so errors messages are not displayed when, for example, the app crashes

Test Plan:
test program :

```#include <Eina.h>

#define ERR(...)  EINA_LOG_DOM_ERR(log_dom, __VA_ARGS__)

int main()
{
  int log_dom = -1;

  eina_init();

  log_dom = eina_log_domain_register("eet", EINA_COLOR_CYAN);
  if (log_dom < 0)
    {
      printf("error register\n");
      return 0;
    }

  ERR("an error.");

  while (1)
    {
    }

  return 0;
}
```

without the patch, nothing is displayed, even after a Ctrl-C to finish the program

with the patch, the error message is displayed

Reviewers: raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12058
src/lib/eina/eina_log.c