5
/* $Header: /tmp/hpctools/ga/tcgmsg/ipcv4.0/llog.c,v 1.6 2004-04-01 02:04:57 manoj Exp $ */
15
#if (defined(SUN) && !defined(SOLARIS))
16
extern char *sprintf();
26
close and open stdin and stdout to append to a local logfile
27
with the name log.<process#> in the current directory
33
(void) sprintf(name, "log.%03ld",NODEID_());
35
(void) fflush(stdout);
36
(void) fflush(stderr);
38
if (freopen(name, "a", stdout) == (FILE *) NULL)
39
Error("LLOG_: error re-opening stdout", (long) -1);
41
if (freopen(name, "a", stderr) == (FILE *) NULL)
42
Error("LLOG_: error re-opening stderr", (long) -1);
45
(void) printf("\n\nLog file opened : %s\n\n",ctime(&t));
46
(void) fflush(stdout);