diff -Nru incron-0.5.12/debian/bzr-builder.manifest incron-0.5.12/debian/bzr-builder.manifest --- incron-0.5.12/debian/bzr-builder.manifest 2015-02-10 08:47:05.000000000 +0000 +++ incron-0.5.12/debian/bzr-builder.manifest 2017-09-30 15:31:31.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version {debupstream}-0~63 -lp:incron revid:git-v1:02c88fb221987bb906f375b9cf31c614af76e829 +# bzr-builder format 0.3 deb-version {debupstream}-0~65 +lp:incron revid:git-v1:08d8e7a26143fa9d992fba68b9a265a534ef039b diff -Nru incron-0.5.12/debian/changelog incron-0.5.12/debian/changelog --- incron-0.5.12/debian/changelog 2015-02-10 08:47:05.000000000 +0000 +++ incron-0.5.12/debian/changelog 2017-09-30 15:31:31.000000000 +0000 @@ -1,8 +1,8 @@ -incron (0.5.12-0~63~ubuntu15.04.1) vivid; urgency=low +incron (0.5.12-0~65~ubuntu15.04.1) vivid; urgency=low * Auto build. - -- Andreas Altaïr Redmer Tue, 10 Feb 2015 08:47:05 +0000 + -- Andreas Altaïr Redmer Sat, 30 Sep 2017 15:31:31 +0000 incron (0.5.12-1) unstable; urgency=medium diff -Nru incron-0.5.12/icd-main.cpp incron-0.5.12/icd-main.cpp --- incron-0.5.12/icd-main.cpp 2015-02-10 08:47:05.000000000 +0000 +++ incron-0.5.12/icd-main.cpp 2017-09-30 15:31:31.000000000 +0000 @@ -152,9 +152,18 @@ } if (ok) { - // ignore files that start with a dot - if (pDe->d_name[0] == '.') - continue; + + // ignore hidden files starting with "." (dot) + // or backup files ending with "~" (tilde) + if (pDe->d_name[0] == '.') { + syslog(LOG_INFO, "ignoring hidden file %s", pDe->d_name); + continue; + } + if (pDe->d_name[strlen(pDe->d_name)-1] == '~') { + syslog(LOG_INFO, "ignoring backup file %s", pDe->d_name); + continue; + } + syslog(LOG_INFO, "loading table %s", pDe->d_name); UserTable* pUt = new UserTable(pEd, un, true); g_ut.insert(SUT_MAP::value_type(path, pUt)); diff -Nru incron-0.5.12/incrontab.5 incron-0.5.12/incrontab.5 --- incron-0.5.12/incrontab.5 2015-02-10 08:47:05.000000000 +0000 +++ incron-0.5.12/incrontab.5 2017-09-30 15:31:31.000000000 +0000 @@ -10,7 +10,7 @@ incrontab files are read when the \fIincrond\fR(8) daemon starts and after any change (incrontab file are being hooked when incrond is running). -Blank lines are ignored. The general line format is the following: +Blank lines and lines starting with a hash (#) are ignored. The general line format is the following: diff -Nru incron-0.5.12/incrontab.cpp incron-0.5.12/incrontab.cpp --- incron-0.5.12/incrontab.cpp 2015-02-10 08:47:05.000000000 +0000 +++ incron-0.5.12/incrontab.cpp 2017-09-30 15:31:31.000000000 +0000 @@ -109,7 +109,11 @@ { unsigned long u; std::string s1, s2, s3; - + + // ignore comment lines + if (rStr.at(0) == '#') + return false; + StringTokenizer tok(rStr, " \t", '\\'); if (!tok.HasMoreTokens()) return false; diff -Nru incron-0.5.12/README.md incron-0.5.12/README.md --- incron-0.5.12/README.md 2015-02-10 08:47:05.000000000 +0000 +++ incron-0.5.12/README.md 2017-09-30 15:31:31.000000000 +0000 @@ -1,13 +1,12 @@ -inotify cron system -=================== +# inotify cron system [![Build Status](https://travis-ci.org/ar-/incron.svg)](https://travis-ci.org/ar-/incron) (c) Andreas Altair Redmer, 2014, 2015 Lukas Jelinek, 2006, 2007, 2008, 2009, 2012 -Content -======= +## Content + 1. About 2. Install a binary version 3. Obtain the source code @@ -17,8 +16,8 @@ 7. Bugs, suggestions 8. Licensing -1. About -======== +## 1. About + This program is the "inotify cron" system. It consist of a daemon and a table manipulator. You can use it a similar way as the regular cron. The difference is that the inotify cron handles filesystem events @@ -29,8 +28,8 @@ bug-tracking/fixing continued in 2014 on GitHub: https://github.com/ar-/incron . -2. Install a binary version -=========================== +## 2. Install a binary version + On Debian and Ubuntu based systems you can install this software (the version maintained by Debian) with sudo apt-get install incron @@ -55,34 +54,31 @@ (Gentoo, Suse, Ret Hat, ...) please send me a pull request. I will be happy to include it. -3. Obtain the source code -========================= +## 3. Obtain the source code + You can download the latest stable version from https://github.com/ar-/incron/archive/master.tar.gz You can download older versions from https://github.com/ar-/incron/releases -4. Requirements -=============== +## 4. Requirements + * Linux kernel 2.6.13 or later (with inotify compiled in) * inotify headers (inotify.h, sometimes inotify-syscalls.h) installed in /sys. The most common place is /usr/include/sys. * GCC 4.x compiler (probably works also with GCC 3.4, possibly with older versions too) - -5. How to build -=============== -Short: ------- +## 5. How to build + +### Short: ` make -j8 && sudo make install ` -Long: ------ +### Long: This software does not contain a standard portable build mechanism. There is only a Makefile which may be modified manually. On many Linux systems you need not to change @@ -106,8 +102,8 @@ created for generating the API documentation. -6. How to use -============= +## 6. How to use + The incron daemon (incrond) must be run under root (typically from runlevel script etc.). It loads the current user tables and hooks them for later changes. @@ -197,8 +193,8 @@ /home/user1 IN_CLOSE_WRITE,dotdirs=true echo $@/$# | logger ` -7. Bugs, suggestions -==================== +## 7. Bugs, suggestions + incrond is currently not resistent against looping. If you find a bug or have a suggestion how to improve the program, @@ -206,8 +202,8 @@ https://github.com/ar-/incron/issues. -8. Licensing -============ +## 8. Licensing + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 (see LICENSE-GPL). diff -Nru incron-0.5.12/usertable.cpp incron-0.5.12/usertable.cpp --- incron-0.5.12/usertable.cpp 2015-02-10 08:47:05.000000000 +0000 +++ incron-0.5.12/usertable.cpp 2017-09-30 15:31:31.000000000 +0000 @@ -500,6 +500,8 @@ s_procMap.insert(PROC_MAP::value_type(pid, pd)); #endif + int status; + waitpid(pid, &status, 0); } else { #ifdef LOOPER