Bug 63283 - -DFOREGROUND not usable due to SIGWINCH
Summary: -DFOREGROUND not usable due to SIGWINCH
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4-HEAD
Hardware: PC Mac OS X 10.1
: P2 normal with 1 vote (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2019-03-25 08:14 UTC by Moritz Eysholdt
Modified: 2019-03-25 08:14 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Eysholdt 2019-03-25 08:14:19 UTC

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

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:

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?