Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e97dd183
Commit
e97dd183
authored
Mar 09, 1992
by
David J. MacKenzie
Browse files
*** empty log message ***
parent
ee04dc54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
lib-src/movemail.c
lib-src/movemail.c
+13
-6
No files found.
lib-src/movemail.c
View file @
e97dd183
...
...
@@ -80,8 +80,12 @@ extern int lk_open (), lk_close ();
#undef write
#undef close
char
*
malloc
();
char
*
concat
();
char
*
xmalloc
();
#ifndef errno
extern
int
errno
;
#endif
/* Nonzero means this is name of a lock file to delete on fatal error. */
char
*
delete_lockname
;
...
...
@@ -284,9 +288,12 @@ main (argc, argv)
#ifndef MAIL_USE_FLOCK
/* Delete the input file; if we can't, at least get rid of its contents. */
if
(
unlink
(
inname
)
<
0
)
if
(
errno
!=
ENOENT
)
creat
(
inname
,
0666
);
#ifdef MAIL_UNLINK_SPOOL
/* This is generally bad to do, because it destroys the permissions
that were set on the file. Better to just empty the file. */
if
(
unlink
(
inname
)
<
0
&&
errno
!=
ENOENT
)
#endif
/* MAIL_UNLINK_SPOOL */
creat
(
inname
,
0600
);
#ifndef MAIL_USE_MMDF
unlink
(
lockname
);
#endif
/* not MAIL_USE_MMDF */
...
...
@@ -364,11 +371,11 @@ concat (s1, s2, s3)
/* Like malloc but get fatal error if memory is exhausted. */
int
char
*
xmalloc
(
size
)
int
size
;
unsigned
size
;
{
int
result
=
malloc
(
size
);
char
*
result
=
malloc
(
size
);
if
(
!
result
)
fatal
(
"virtual memory exhausted"
,
0
);
return
result
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment