samhocevar / rinetd

📡 TCP/UDP port redirector
GNU General Public License v2.0
859 stars 184 forks source link

Does not produce a error if config file is not found #15

Closed andrewsav-bt closed 3 years ago

andrewsav-bt commented 6 years ago

The program does not produce any output if the config file is absent / not found. Is this supposed to happen?

UPDATE: hm... I can't see any error for example when a host name in the config file cannot be resolved, it's as if stderr does not exist at all... I wonder what I'm doing wrong...

andrewsav-bt commented 6 years ago

Okay, I looked at the source code and

1) It appears that if file cannot be found the program just do exit(1) without attempting to give a message. I suggest an improvement here to show a error.

2) Program routinely logs to syslog. In particular parsing errors go to syslog. If I'm running in a docker container I do not have the syslog. So another suggested improvement is to have an option to log to stderr/stdout instead of syslog.

Thank you.

samhocevar commented 3 years ago

Thanks for the suggestions and sorry for acting so late on them. rinetd now only logs to syslog when forked to the background, otherwise it will use stderr.