Date: Tue, 3 Sep 2002 06:10:04 -0700 (PDT) From: George Glynn <gglynn@biffduncan.com> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/41328: ssh logins in 4.6.1 no longer give incoming mail status Message-ID: <200209031310.g83DA4Ta010076@freefall.freebsd.org>
index | next in thread | raw e-mail
The following reply was made to PR misc/41328; it has been noted by GNATS.
From: George Glynn <gglynn@biffduncan.com>
To: freebsd-gnats-submit@FreeBSD.org, cravey@gotbrains.org
Cc:
Subject: Re: misc/41328: ssh logins in 4.6.1 no longer give incoming mail
status
Date: Tue, 03 Sep 2002 09:01:23 -0400
Here it is, fixed:
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
extern char *getenv();
int main(void)
{
char *mailbox;
struct stat mailstat;
mailbox = getenv("MAIL");
if (mailbox != NULL) {
if (stat(mailbox, &mailstat) != 0 || mailstat.st_size == 0);
else if (mailstat.st_mtime < mailstat.st_atime)
printf("You have mail.\n");
else
printf("You have new mail.\n");
}
return(0);
}
Cheers,
George
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209031310.g83DA4Ta010076>
