drizzled: --help should work in any circumstances

Bug #983258 reported by coldtobi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
coldtobi

Bug Description

Hallo,

drizzled --help should to print the help message and then exit. It should not do other things or do some other funny things.
Especially it should not try to spawn a daemon, which appeareantly it tries...

Example:
# NB: I'm root here.
# lets see what options we have.... The man tells to say drizzled --verbose --help
drizzled --verbose --help
Aborting:"required parameter is missing in 'verbose'. Use --help to get a list of available options. ". Abort was called from drizzled/drizzled.cc:1415 in init_variables_after_daemonizing()
# ok, bug in man.... (I'll report that later)
drizzled --help
Aborting:"drizzled cannot be run as root, use --user to start drizzled up as another user". Abort was called from drizzled/drizzled.cc:578 in check_user()
# mmmh, whats the option to set a user?

drizzled --help --user drizzle
Aborting:"Can't start server, was unable to create PID file: mordor.loewenhoehle.pid". Abort was called from drizzled/drizzled.cc:414 in create_pid_file()
# Why it is try to set the pid file -- all i wanted is the help? (Actually I tried to debug the cannot-open-pid-file issue...)

coldtobi

Related branches

Revision history for this message
coldtobi (tobi-coldtobi) wrote :

See attached patch.

The patch tries to emit the help as soon as possible. before parsing the options.

Revision history for this message
Patrick Crews (patrick-crews) wrote :

Thanks for the patch, but why not submit a branch / propose for merge?
http://docs.drizzle.org/contributing/introduction.html

Changed in drizzle:
status: New → Triaged
importance: Undecided → Medium
Vijay Samuel (vjsamuel)
Changed in drizzle:
assignee: nobody → coldtobi (tobi-coldtobi)
status: Triaged → Fix Released
milestone: none → 7.2.4
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.