Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
bb957397
...
bb957397c13ca9f7df29ede24d5eac4d3e3800a1
authored
2002-11-18 17:07:10 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Test if environment variable MTA_APPEND is set.
1 parent
5e303a63
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
examples/mta.c
examples/mta.c
View file @
bb95739
...
...
@@ -40,6 +40,8 @@
is "localhost".
MTA_DIAG Sets the name of the output diagnostic file. By default,
the diagnostics goes to stderr.
MTA_APPEND When set to any non-empty value, directs mta to append
to the diagnostics file, not to overwrite it.
*/
...
...
@@ -130,7 +132,8 @@ main (int argc, char **argv)
char
*
name
=
getenv
(
"MTA_DIAG"
);
if
(
name
)
{
diag
=
fopen
(
name
,
"w"
);
char
*
mode
=
getenv
(
"MTA_APPEND"
)
?
"a"
:
"w"
;
diag
=
fopen
(
name
,
mode
);
if
(
!
diag
)
{
mu_error
(
"%s: can't open diagnostic output: %s"
,
...
...
Please
register
or
sign in
to post a comment