Bug 63283

Summary: -DFOREGROUND not usable due to SIGWINCH
Product: Apache httpd-2 Reporter: Moritz Eysholdt <moritz>
Component: CoreAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 2.4-HEAD   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X 10.1   

Description Moritz Eysholdt 2019-03-25 08:14:19 UTC
Hello,

I wanted to run Apache with -DFOREGROUND so that I 
* can conveniently/efficiently develop and test Apache config files
* can watch logs in stdout/stderr
* can kill the process with CtRL+C
* can restart the process with whatever args I want

However, whenever I resize my console, I get 

[Mon Mar 25 08:01:49.545232 2019] [mpm_prefork:notice] [pid 494] AH00170: caught SIGWINCH, shutting down gracefully
Terminated

Is there any way to use -DFOREGROUND in combination with an interactive terminal?

I understand that SIGWINCH is internally used to initiate a graceful shutdown and I don't want to question this design decision. Changing the signal was dismissed as 'won't fix' here: https://bz.apache.org/bugzilla/show_bug.cgi?id=50669

To reproduce, run `apache2 -DFOREGROUND` and resize your terminal.
If you don't have an apache config at hand, you may click here:
https://gitpod.io/#https://github.com/meysholdt/apache-in-gitpod-example/tree/apache_sigwinch_issue

This launches a Docker container on the server side with Apache to reproduce the issue and an IDE in your browser. You also get a Bash Terminal in your browser where you can interact with Apache. You'll need to go through Github OAuth. 

So, in summary:
* How can I run apache as a foreground process without having it killed by the next terminal resize?
* Could Apache maybe *not* listen to SIGWINCH when arg -DFOREGROUND is used?