#166 closed defect (wontfix)
-c option fails with pipes
Reported by: | Carl Youngblood | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | nginx-core | Version: | 1.3.x |
Keywords: | Cc: | ||
uname -a: | Linux carlminion1 3.3.4-3.fc16.x86_64 #1 SMP Thu May 3 14:46:44 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux | ||
nginx -V: |
nginx version: nginx/1.0.15
built by gcc 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC) TLS SNI support enabled configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --with-mail --with-mail_ssl_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-ld-opt=-Wl,-E |
Description
running nginx with -c and process substitution or a named pipe fails where the same config loaded from a normal file succeeds.
success (from a file)
[carl@carlminion1 bin]$ nginx -c /home/carl/bin/gar.conf
[carl@carlminion1 bin]$ nginx -c /home/carl/bin/gar.conf -s stop
fail (from process sub)
[carl@carlminion1 bin]$ nginx -c <(cat /home/carl/bin/gar.conf)
nginx: [emerg] no "events" section in configuration
fail (from named pipe)
[carl@carlminion1 bin]$ nginx -c /home/carl/bin/test (shell 1)
[carl@carlminion1 bin]$ cat gar.conf > test (shell 2)
nginx: [emerg] no "events" section in configuration (shell 1)
Note:
See TracTickets
for help on using tickets.
Yes, nginx uses generic file reading mechanism to read config file, and it fails with fifos/pipes due to file size not known and pread() function used. There are no plans to fix this.