Github user zizhong commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/1457#discussion_r103575599
  
    --- Diff: proxy/Main.cc ---
    @@ -460,7 +460,7 @@ proxy_signal_handler(int signo, siginfo_t *info, void 
*ctx)
       shutdown_event_system = true;
       sleep(1);
     
    -  ::exit(signo);
    --- End diff --
    
    I couldn't understand why this change can cause an issue with leak 
detection.I read your original ticket about this line changing from `_exit` to 
`exit`. The reason you made that change was to fix some crashes on fedora 
instead of fixing leak detection issues. However,
    it's never okay to call `exit` in a signal handler.  `exit()` is not an 
Async-signal-safe function, which can refer to [this man 
page](http://man7.org/linux/man-pages/man7/signal.7.html). Hence, we got lots 
of crashes when stopping or restarting ATS.
    Besides, @zwoop tested this patch didn't make any behavior change of leak 
detection tools. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to