FreeBSD Port: swatch-3.0.8
goblin
goblin at nnt.ru
Mon Mar 22 00:45:47 PST 2004
Hello joseph,
at first, sorry for my poor english, but i hope
you can understand me :)
i have some problems using this program, and fixed it,
but it is a little boring to patch swatch on each cvsup %(
so i ask you to apply my patch to this port plz
(current patch is for swatch-3.0.8_1)
here are the problems:
1. using sendmail program
here is swatch.conf example
----------------
watchfor /blin/
echo
mail addresses=goblin\@nnt.ru
----------------
it sends mail on first occurence of blin, but then it hangs
in wait() state, waiting while sendmail process is finished
(while it is already died)
patch is to add
local $SIG{CHLD} = 'default';
before open(SENDMAIL, "| /usr/sbin/sendmail...")
so wait() returns successfully on sendmail's exit
2.
while using tail cmd, it does not like any signals,
so on kill -HUP <swatch.pl pid>, it sends SIGTERM
to child .swatch.pid process, but
in function goodbye() it hangs on exit(0),
because /usr/bin/tail still works...
patch is to start /usr/bin/tail not like
open (TAIL, "/usr/bin/tail |")
but fork-exec with saving child pid and kill TAIL process in
goodbye
all works fine (kill -1 <swatch pid, .swatch.pid pid>)
3. and, may be, it is useful to start tail with not -n 1,
but -n 0, but it is ... as you wish
--
Best regards,
goblin mailto:goblin at nnt.ru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swatch.sendmail.and.tail.patch
Type: application/octet-stream
Size: 1862 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20040322/3642a4e6/swatch.sendmail.and.tail.obj
More information about the freebsd-ports
mailing list