1

I have copied this question over here from unix.StackOverflow

When I use incrontab out of the box, I mean no changes, I get no result, as if the cmd was not executed.

my incron line is : /crrae IN_CREATE,IN_CLOSE_WRITE,IN_MOVED_TO /usr/bin/unix2dos $#

the log give information as if everything was ok but no actually

the strace generated is: incrontab_trace_0.txt

 0.000000 poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}], 3, -1) = 1 ([{fd=8, revents=POLLIN}])
17.616276 read(8, "\1\0\0\0\0\1\0\0\0\0\0\0000\0\0\0ExportSageJDE_CO"..., 32768) = 64
 0.000145 stat64("/crrae", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
 0.000147 time(NULL)                = 1399228077
 0.000056 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=156, ...}) = 0
 0.000089 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=156, ...}) = 0
 0.000082 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=156, ...}) = 0
 0.000096 send(3, "<78>May  4 18:27:57 incrond[3183"..., 108, MSG_NOSIGNAL) = 108
 0.000104 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7f60718) = 31838
 0.000816 poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}], 3, -1) = -1 EINTR (Interrupted system call)
 0.000834 --- SIGCHLD (Child exited) @ 0 (0) ---
 0.000033 read(4, 0x8069c40, 32)    = -1 EAGAIN (Resource temporarily unavailable)
 0.000057 write(5, "X", 1)          = 1
 0.000056 sigreturn()               = ? (mask now [])
 0.000072 poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}], 3, -1) = 1 ([{fd=4, revents=POLLIN}])
 0.000068 read(4, "X", 1)           = 1
 0.000054 read(4, 0xbfd22dd9, 1)    = -1 EAGAIN (Resource temporarily unavailable)
 0.000057 waitpid(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], WNOHANG) = 31838
 0.000060 waitpid(-1, 0xbfd22dd4, WNOHANG) = -1 ECHILD (No child processes)
 0.000051 poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}], 3, -1) = 1 ([{fd=8, revents=POLLIN}])
 0.009198 read(8, "\1\0\0\0\10\0\0\0\0\0\0\0000\0\0\0ExportSageJDE_CO"..., 32768) = 64
 0.000074 stat64("/crrae", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
 0.000118 time(NULL)                = 1399228077
 0.000057 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=156, ...}) = 0
 0.000084 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=156, ...}) = 0
 0.000082 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=156, ...}) = 0
 0.000090 send(3, "<78>May  4 18:27:57 incrond[3183"..., 108, MSG_NOSIGNAL) = 108
 0.000065 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7f60718) = 31839
 0.000614 poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}], 3, -1) = -1 EINTR (Interrupted system call)
 0.000832 --- SIGCHLD (Child exited) @ 0 (0) ---
 0.000026 read(4, 0x8069c40, 32)    = -1 EAGAIN (Resource temporarily unavailable)
 0.000055 write(5, "X", 1)          = 1
 0.000054 sigreturn()               = ? (mask now [])
 0.000071 poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}], 3, -1) = 1 ([{fd=4, revents=POLLIN}])
 0.000067 read(4, "X", 1)           = 1
 0.000053 read(4, 0xbfd22dd9, 1)    = -1 EAGAIN (Resource temporarily unavailable)
 0.000051 waitpid(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], WNOHANG) = 31839
 0.000058 waitpid(-1, 0xbfd22dd4, WNOHANG) = -1 ECHILD (No child processes)
 0.000050 poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}], 3, -1 <unfinished ...>

When I change my incron to:

/crrae IN_CREATE,IN_CLOSE_WRITE,IN_MOVED_TO /usr/bin/unix2dos /crrae/$# 

or

/crrae IN_CREATE,IN_CLOSE_WRITE,IN_MOVED_TO /usr/bin/unix2dos $@/$#

the log give me this:

May  4 18:15:10 srvovs incrond[20859]: (root) CMD (/usr/bin/unix2dos /crrae/u2dtmpPbqoFd)
May  4 18:15:10 srvovs incrond[20859]: (root) CMD (/usr/bin/unix2dos /crrae/u2dtmpN2Odxf)
May  4 18:15:10 srvovs incrond[20859]: (root) CMD (/usr/bin/unix2dos /crrae/u2dtmpN2Odxf)

multiple times, the incron.conf has not been modified. Any ideas?

  • `I have copied this question over here from unix.StackOverflow` - don't do that there are mechanisms available to migrate questions from one SE site to another should it be necessary. – user9517 May 05 '14 at 11:23
  • The error was the directory where the cmd was executed. – user3545361 May 13 '14 at 17:49

0 Answers0