Incrontab não executa o comando

1

Quando uso o incrontab fora da caixa, quero dizer que não há alterações, Não obtenho resultado, como se o comando não fosse executado.

minha linha incron é: /crrae IN_CREATE,IN_CLOSE_WRITE,IN_MOVED_TO /usr/bin/unix2dos $#

o log informa como se tudo estivesse ok, mas na verdade não

o strace gerado é: 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, "
/crrae IN_CREATE,IN_CLOSE_WRITE,IN_MOVED_TO /usr/bin/unix2dos /crrae/$# 
/crrae IN_CREATE,IN_CLOSE_WRITE,IN_MOVED_TO /usr/bin/unix2dos $@/$#
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)
 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, "
/crrae IN_CREATE,IN_CLOSE_WRITE,IN_MOVED_TO /usr/bin/unix2dos /crrae/$# 
/crrae IN_CREATE,IN_CLOSE_WRITE,IN_MOVED_TO /usr/bin/unix2dos $@/$#
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)
%pre%%pre%%pre%%pre%%pre%%pre%%pre%00%pre%%pre%%pre%ExportSageJDE_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, "%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%00%pre%%pre%%pre%ExportSageJDE_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 ...>
%pre%%pre%%pre%%pre%%pre%%pre%00%pre%%pre%%pre%ExportSageJDE_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, "%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%%pre%00%pre%%pre%%pre%ExportSageJDE_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 ...>

Quando altero meu incron para:

%pre%

ou

%pre%

o log me dá isso:

%pre%

várias vezes, o incron.conf não foi modificado. Alguma idéia?

    
por user3545361 05.05.2014 / 11:56

1 resposta

0

A execução de um comando ( unix2dos ) que grava e fecha um arquivo com base em um evento CLOSE_WRITE é o que é conhecido como "loop". incrontab tem proteções contra o looping embutido.

    
por 25.08.2016 / 19:14