Opened 4 years ago

Closed 4 years ago

#592 closed defect (wontfix)

Why write nginx version on stderr?

Reported by: launchpad.net/~miteshshah Owned by:
Priority: minor Milestone: 1.6.1
Component: nginx-core Version: 1.6.x
Keywords: version Cc:
uname -a: Linux Mitesh 3.2.0-65-generic #99-Ubuntu SMP Fri Jul 4 21:03:29 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.6.0 TLS SNI support enabled configure arguments: --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-http_spdy_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --without-mail_pop3_module --without-mail_smtp_module --without-mail_imap_module --add-module=/build/buildd/nginx-1.6.0/debian/modules/nginx-auth-pam --add-module=/build/buildd/nginx-1.6.0/debian/modules/nginx-echo --add-module=/build/buildd/nginx-1.6.0/debian/modules/nginx-upstream-fair --add-module=/build/buildd/nginx-1.6.0/debian/modules/nginx-cache-purge --add-module=/build/buildd/nginx-1.6.0/debian/modules/nginx-upload-progress --add-module=/build/buildd/nginx-1.6.0/debian/modules/headers-more-nginx-module

Description

Hello Nginx,

I've noticed the nginx -v and nginx -V writes its output in stderr
Ref: http://trac.nginx.org/nginx/browser/nginx/src/core/nginx.c#L219

Its good to display nginx version on stdout not in stderr
Also how should we submit a patch request for this bug?

Thank you
--Mitesh Shah

Change History (3)

comment:1 Changed 4 years ago by maxim

Why do you think this is a bug?

comment:2 Changed 4 years ago by mdounin

This is how it works since introduction - nginx consistently uses stderr for all output, and nginx -vt outputs nginx version and the result of configuration testing to stderr. One can use nginx -V 2>&1 to get the output in stdout if needed.

I don't think that changing this worth the effort and introduced incompatibilities. Note well that many other tools out there do the same, gcc and java for example.

See http://nginx.org/en/docs/contributing_changes.html about recommended way to submit patches.

comment:3 Changed 4 years ago by maxim

  • Resolution set to wontfix
  • Status changed from new to closed

Feedback timeout.

Note: See TracTickets for help on using tickets.