search for: hostswritten

Displaying 1 result from an estimated 1 matches for "hostswritten".

2006 Mar 24
3
Triggering on close of a written file.
...sename(copyinstr(self->file)) == "hosts"/ { self->hostsfd=arg1; /* printf("Filename=%s fd=%d",basename(copyinstr(self- >file)),arg1); */ } syscall::write:entry /arg0==self->hostsfd/ { /* trace("Write hosts"); */ self->hostswritten=1; } syscall::close:entry /arg0==self->hostsfd && self->hostswritten==1/ { system("/usr/local/bin/regen-zonefiles"); self->hostsfd=-1 ; } Is there an easier/better way to do this, I think this script fails to detect a failed write, what is the best way to d...