9
# include <sys/types.h>
15
# include <sys/time.h>
23
* close and open stdin and stdout to append to a local logfile
24
* with the name log.<process#> in the current directory
31
(void) sprintf(name, "log.%03ld",NODEID_());
33
(void) fflush(stdout);
34
(void) fflush(stderr);
36
if (freopen(name, "a", stdout) == (FILE *) NULL) {
37
Error("LLOG_: error re-opening stdout", (Integer) -1);
40
if (freopen(name, "a", stderr) == (FILE *) NULL) {
41
Error("LLOG_: error re-opening stderr", (Integer) -1);
45
(void) printf("\n\nLog file opened : %s\n\n",ctime(&t));
46
(void) fflush(stdout);