version 1.2, 1996/03/05 03:16:08 |
version 1.3, 1996/06/25 22:23:18 |
|
|
int flags; |
int flags; |
char *msgbuf; |
char *msgbuf; |
{ |
{ |
|
int fd; |
|
|
if (IS_ON(flags, MT_DEBUG)) |
if (IS_ON(flags, MT_DEBUG)) |
return; |
return; |
|
|
|
|
(void) sprintf(tempfile, "%s/%s", cp, _RDIST_TMP); |
(void) sprintf(tempfile, "%s/%s", cp, _RDIST_TMP); |
|
|
msgfac->mf_filename = tempfile; |
msgfac->mf_filename = tempfile; |
(void) mktemp(msgfac->mf_filename); |
if ((fd = mkstemp(msgfac->mf_filename)) == -1 || |
if ((msgfac->mf_fptr = fopen(msgfac->mf_filename, "w"))==NULL) |
(msgfac->mf_fptr = fdopen(fd, "w"))==NULL) { |
|
if (fd != -1) |
|
close(fd); |
fatalerr("Cannot open notify file for writing: %s: %s.", |
fatalerr("Cannot open notify file for writing: %s: %s.", |
msgfac->mf_filename, SYSERR); |
msgfac->mf_filename, SYSERR); |
|
} |
debugmsg(DM_MISC, "Created notify temp file '%s'", |
debugmsg(DM_MISC, "Created notify temp file '%s'", |
msgfac->mf_filename); |
msgfac->mf_filename); |
} |
} |