Adding code to make stdout and stderr unbuffered, depending on the MOZ_UNBUFFERED_STDIO environment variable. This is needed for tests to run correctly.

This commit is contained in:
sfraser%netscape.com 2002-07-18 00:26:49 +00:00
parent 9a5b9b5994
commit 14d3a7e5dd
4 changed files with 44 additions and 0 deletions

View File

@ -1,6 +1,17 @@
#import <Cocoa/Cocoa.h>
static void SetupRuntimeOptions(int argc, const char *argv[])
{
if (getenv("MOZ_UNBUFFERED_STDIO")) {
printf("stdout and stderr unbuffered\n");
setbuf(stdout, 0);
setbuf(stderr, 0);
}
}
int main(int argc, const char *argv[])
{
SetupRuntimeOptions(argc, argv);
return NSApplicationMain(argc, argv);
}

View File

@ -1,6 +1,17 @@
#import <Cocoa/Cocoa.h>
static void SetupRuntimeOptions(int argc, const char *argv[])
{
if (getenv("MOZ_UNBUFFERED_STDIO")) {
printf("stdout and stderr unbuffered\n");
setbuf(stdout, 0);
setbuf(stderr, 0);
}
}
int main(int argc, const char *argv[])
{
SetupRuntimeOptions(argc, argv);
return NSApplicationMain(argc, argv);
}

View File

@ -1,6 +1,17 @@
#import <Cocoa/Cocoa.h>
static void SetupRuntimeOptions(int argc, const char *argv[])
{
if (getenv("MOZ_UNBUFFERED_STDIO")) {
printf("stdout and stderr unbuffered\n");
setbuf(stdout, 0);
setbuf(stderr, 0);
}
}
int main(int argc, const char *argv[])
{
SetupRuntimeOptions(argc, argv);
return NSApplicationMain(argc, argv);
}

View File

@ -1,6 +1,17 @@
#import <Cocoa/Cocoa.h>
static void SetupRuntimeOptions(int argc, const char *argv[])
{
if (getenv("MOZ_UNBUFFERED_STDIO")) {
printf("stdout and stderr unbuffered\n");
setbuf(stdout, 0);
setbuf(stderr, 0);
}
}
int main(int argc, const char *argv[])
{
SetupRuntimeOptions(argc, argv);
return NSApplicationMain(argc, argv);
}