Closed atncsj6h closed 2 years ago
Hi Fish ,
I found the solution without changing the code
hercules -f /dev/null
solves the issue on Apple
it should also solve it on any unix like system that support /dev/null
I will keep you informed if/when ythe workaround will not work any longer
enrico
before the commit it was possible to start hercules with
hercules -f none
now it is not possible any longer
Hmmmm... You're right! I wasn't aware of that. Thanks.
But AFAIK, not specifying any configuration file at all (i.e. starting hercules without the -f cfgfile
argument) is still, and always has been, an error. That's what my change was trying to notify the user of.
I just didn't implement it correctly. Sorry. :(
( I do not remember if the possibility was ever documented, but it was given as an option in some replies to forum/list topics )
That's probably what screwed me up: it wasn't documented anywhere, neither in our documentation, nor anywhere in the code either.
but if I issue the command
touch hercules.cnf
in the current working directory then hercules starts with an empty configuration file which in my opinion is just the same as running hercules without a configuration file with the added nuisance of having to pollute everithing with empty config files
Confirmed. But you shouldn't have to do that, obviously. My commit obviously broke things.
(sigh!) Let me backout my commit (since it's obviously bad) and go back to the drawing board... (and update the documentation AND CODE as well...)
Thanks, Enrico.
I found the solution without changing the code
hercules -f /dev/null
solves the issue on Apple it should also solve it on any unix like system that support/dev/null
FYI: it works on Windows too, but you have to use filename NUL
instead:
hercules -f NUL
("NUL"
is Microsoft's equivalent to *nix's /dev/null
)
I m happy for that
You spent time providing an insight of what is going on so let's not throw away your work
IMO it is enough to document on how to do it
enrico
Fish the fastest fingers around here :-)
Fixed by commit fd955da4ab06fc3420184918ec338e61db19e184.
-f none
now works as expected, AND an informative error message is issued if no -f
argument is specified at all.
Fish the fastest fingers around here :-)
;-)
tested on APPLE Big Sur , FreeBSD 13 , Fedora 35 - everything works
enrico
tested on APPLE Big Sur , FreeBSD 13 , Fedora 35 - everything works
Thanks.
However, can I ask you to test again, please? :)
I just committed another change (minor tweak) that IMHO provides a cleaner, more appropriate fix to the unspecified -f
and/or -r
argument(s) issue. (I also tweaked (fixed) the documentation as well.) Thanks!
Hi Fish, everything works as expected you can fix the code but You cannot fix the users the whole topic is about users not reading and trying to understand the documentation
right now the only point about which some idiot(*) will complain is the situation depicted in the flow below
work/hyperion/build % ./hercules
HHC00100I Thread id 0000000100c53d40, prio 5, name 'impl_thread' started
HHC00100I Thread id 000000016f387000, prio 4, name 'logger_thread' started
HHC02342S Configuration file 'hercules.cnf' not found: No such file or directory
HHC00007I Previous message from function 'process_args' at impl.c(1801)
HHC02343S Terminating due to 1 argument errors
HHC00007I Previous message from function 'impl' at impl.c(1050)
HHC01420I Begin Hercules shutdown
HHC01423I Calling termination routines
HHC01424I All termination routines complete
HHC01425I Hercules shutdown complete
HHC01412I Hercules terminated
work/hyperion/build % ./hercules -f missing
HHC00100I Thread id 0000000103393d40, prio 5, name 'impl_thread' started
HHC00100I Thread id 000000016cf77000, prio 4, name 'logger_thread' started
HHC02342S Configuration file 'missing' not found: No such file or directory
HHC00007I Previous message from function 'process_args' at impl.c(1801)
HHC02343S Terminating due to 1 argument errors
HHC00007I Previous message from function 'impl' at impl.c(1050)
HHC01420I Begin Hercules shutdown
HHC01423I Calling termination routines
HHC01424I All termination routines complete
HHC01425I Hercules shutdown complete
HHC01412I Hercules terminated
work/hyperion/build %
if the user has not read the docs he will complain about what the heck is hercules.cnf
I think we have spent enough time dealing whith this issue time to close it enrico
(*) the mother of the idiots is always pregnant
Hi Fish, everything works as expected
Thanks for the confirmation.
you can fix the code but You cannot fix the users
Don't I know it!
I think we have spent enough time dealing whith this issue time to close it
Agreed. Closing!
(*) the mother of the idiots is always pregnant
I have an alternate signature that I sometimes (but extremely rarely) use, containing the following quote I found on the web many, many years ago:
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rich Cook
before the commit it was possible to start hercules with
hercules -f none
now it is not possible any longer ( I do not remember if the possibility was ever documented, but it was given as an option in some replies to forum/list topics )but if I issue the command
touch hercules.cnf
in the current working directory then hercules starts with an empty configuration file which in my opinion is just the same as running hercules without a configuration file with the added nuisance of having to pollute everithing with empty config filesthank You in advance enrico