That may not be so hack-ish at all. In fact, it's a pretty good solution for other reasons, namely that the application won't be generating a bunch of errors that can be ignored. I hate what I call "erroneous errors" - errors that really should be dealt with by the application rather than the user. This is one of those cases - while ppp is down, you end up with a bunch of failures to download. All errors which you can ignore. Embedded in there may be other errors which are not ignorable, but they get lost in the clutter of ignorable errors, and you don't pay attention.
By following your suggestion, the errors that are left are likely to be interesting/important errors that need to be addressed. Or there are no further errors, and you can more deservedly have a nice, warm, cozy feeling about how good of a job your script is doing in fetching whatever it is supposed to be fetching.
| [reply] |
Thank you for that suggestion.
Using if-up if-down scripts is probably the best work-around.
Still I'd like to know, whether it's possible to "refresh" the network parameters of a running perl script. Is it possible in C? The resolver library is part of libc, so how could I make my program reread /etc/resolv.conf?
| [reply] |