Guus Sliepen (2013-05-29 16:45:46 +0200) wrote: > On Wed, May 29, 2013 at 02:19:53PM +0200, Ivan Vilata i Balaguer wrote: > > > Hi, when using ``tincd -k HUP -n NETWORK`` to reload the > > configuration of a particular network, the command exited > > successfully but tinc stopped running, and I noticed the "Got TERM > > signal" and "Terminating" messages in the daemon log. However, > > using ``tincd -kHUP -n NETWORK`` (without separating "-k" from > > "HUP") worked as expected and tinc got and reported "Got HUP > > signal". > > > > This looks like some problem with the parsing of options, i.e. the > > "-k" option is recognised but not its argument. However please note > > that separating the option from its argument actually worked with > > the "-n" option. > > This is not strictly a bug, but the result of tinc using > getopt_long(), which requires that there is no space between a short > option and an _optional_ argument. If there is a space, it treats the > option as without argument and what you think the argument is is being > ignored. > > Of course, this is not what you might expect, I'll change it in the > next version.
The main problem here is that tincd doesn't complain about the odd "HUP" argument and it goes on with a different value. I don't know how getopt works, but maybe "HUP" is considered a non-option argument. Since tinc(1) indicates that there are no valid non-option arguments, the program could show an error and abort the task. Thank you very much! -- Ivan Vilata i Balaguer -- https://elvil.net/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org