Subject: Re: admin/10957: cron ignores last line of crontab if newline is missing
To: NetBSD GNATS submissions and followups <gnats-bugs@gnats.netbsd.org>
From: Olaf Seibert <rhialto@polderland.nl>
List: netbsd-bugs
Date: 09/22/2000 02:56:28
On Wed 06 Sep 2000 at 11:48:20 -0400, Greg A. Woods wrote:
> [ On Tuesday, September 5, 2000 at 12:12:07 (-0700), eravin@panix.com wrote: ]
> > Subject: admin/10957: cron ignores last line of crontab if newline is missing
> >
> > If the last line of a user's crontab does not end in newline, cron
> > ignores the entry.
>
> Cron is not unique in this respect. This is a very common "problem"
> with many unix tools. Programmers often make this mistake, and though
Traditionally, Unix (or C) defines text files as being terminated by
newlines, as opposed to separated by newlines (the Pascal view). In
which case, the last "line" is not a line and should be ignored indeed.
In fact, there is some C library for MS-DOS which actually works like
that in fgets(). I forget if it was the MS or Borland compiler though
which did that. But since it is rather inconvenient, I tend to consider
it a bug anyway.
-Olaf.
--
___ Olaf 'Rhialto' Seibert - rhialto@polder -- Ah only did well at school
\X/ land.nl -- tae git intae an O level class tae git away fae Begbie.
Hi! I am a .signature virus. Copy me into your .signature to help me spread.