From owner-freebsd-bugs Tue Sep 3 6:10:12 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E04B37B400 for ; Tue, 3 Sep 2002 06:10:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0C5E43E42 for ; Tue, 3 Sep 2002 06:10:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g83DA4JU010077 for ; Tue, 3 Sep 2002 06:10:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g83DA4Ta010076; Tue, 3 Sep 2002 06:10:04 -0700 (PDT) Date: Tue, 3 Sep 2002 06:10:04 -0700 (PDT) Message-Id: <200209031310.g83DA4Ta010076@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: George Glynn Subject: Re: misc/41328: ssh logins in 4.6.1 no longer give incoming mail status Reply-To: George Glynn Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/41328; it has been noted by GNATS. From: George Glynn 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 #include #include 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