diff options
author | jilles <jilles@FreeBSD.org> | 2010-02-06 22:57:24 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-02-06 22:57:24 +0000 |
commit | 9c81a24436f4b19434a1d75bf5b592a13ad156c2 (patch) | |
tree | 9e9308576f99844cd3f9846a35a80d74607e5c0a /bin/sh/main.c | |
parent | 6d3ec806895e807566f3ba15226c51fc15c5e7a5 (diff) | |
download | FreeBSD-src-9c81a24436f4b19434a1d75bf5b592a13ad156c2.zip FreeBSD-src-9c81a24436f4b19434a1d75bf5b592a13ad156c2.tar.gz |
sh: Do not stat() $MAIL/$MAILPATH in non-interactive shells.
These may be NFS mounted, and we should not touch them unless we are going
to do something useful with the information.
Diffstat (limited to 'bin/sh/main.c')
-rw-r--r-- | bin/sh/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c index ece63c8..50a8813 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -157,6 +157,8 @@ main(int argc, char *argv[]) out2fmt_flush("sh: cannot determine working directory\n"); if (getpwd() != NULL) setvar ("PWD", getpwd(), VEXPORT); + if (iflag) + chkmail(1); if (argv[0] && argv[0][0] == '-') { state = 1; read_profile("/etc/profile"); |