incron icon indicating copy to clipboard operation
incron copied to clipboard

incrontab(1) mangles comments in incrontab(5)

Open ar- opened this issue 10 years ago • 7 comments

Originals: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563700 http://bts.aiken.cz/view.php?id=449

incrontab(1) mangles comments in incrontab(5): it changes the first word on every comment line to "0". For example, if I run incrontab and create a file with the following comment lines:

Only put 1 space between fields 2 and 3! Additional whitespace will be

assumed to be part of field 3, causing the command to fail!

then incrontab -l shows that I have the following incrontab file: #0 put 1 space between fields 2 and 3! Additional whitespace will be #0 to be part of field 3, causing the command to fail!

ar- avatar Jan 25 '15 07:01 ar-

still persistent in v 0.5.10

ar- avatar Jan 25 '15 07:01 ar-

after some time of checking I relised that this is not a bug. The man page mentioning comment lines is incron.conf.5 . incrontab is not supposed to have comments. Documentation and implementation are correct. Adding a # to a incrontab file, will cause unexpected behaviour since it is not a valid file, signal or command.

On the other side it would be a useful feature to have command lines in incrontab files, so this issue remains open, but with lower priority.

ar- avatar Jan 25 '15 12:01 ar-

The ability to have comments in the incrontab file, I consider it very useful.

fhanzlik avatar Nov 13 '15 23:11 fhanzlik

@ar- Is this not yet fixed? I'm still getting a massive memory leak (~3GB) when I add comments to incrontab

mustaqimM avatar Apr 20 '17 06:04 mustaqimM

Ouch! after upgrading to incron 0.5.12, then comment (line starting with '#') in incrontab leads to filling my logs with huge (~35000 lines/sec - but probably more - other lines are discarded by rsyslog) amount messages as:

Jun 24 19:54:12 klempak incrond[1182]: cannot create watch for system table export.conf: (22) Invalid argument

Please, please - allow comment lines in incron tables!

fhanzlik avatar Jun 24 '18 18:06 fhanzlik

I'm seeing this here as well, after 3+ hours run time a lot of memory has been wasted by incrond:

root      3903  4.0 33.4 10993028 10966764 ?   Ss   08:04   8:34 /usr/sbin/incrond

robert-scheck avatar Dec 28 '18 10:12 robert-scheck

There are any news for using of comments in incrontab? I'm one of who think that's a good feature, to track some information about the recorderd operation...like in classic cron or sytemd orany other CLI tool.

dharmann avatar Jul 13 '23 07:07 dharmann