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