Changeset 918

Show
Ignore:
Timestamp:
09/18/07 12:25:00 (1 year ago)
Author:
alo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/ChangeLog

    r917 r918  
    112007-09-18  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * cherokee/cherokee-panic: It should use sendfile rather than mail 
     4        or mailx. It is a more standard application. 
     5 
     6        * cherokee/Makefile.am (-DCHEROKEE_PANIC_PATH), 
     7        cherokee/server.c (cherokee_server_new): Added panic_action to the 
     8        default configuration. From now on, if the server crashes it will 
     9        call cherokee-panic by default. 
    210 
    311        * cherokee/cherokee-panic: Fixed typo. It also slightly improves 
  • cherokee/trunk/cherokee/cherokee-panic

    r917 r918  
    55#   mail - mail the error. You need a working MTA in the system. 
    66#   cat  - just print it 
    7 if [ `which mail` ]; then 
     7if [ -x /usr/sbin/sendmail ]; then 
    88   action=mail 
    99else 
     
    2929        fi 
    3030 
     31        # Mail header 
     32        if [ x$action = xmail ]; then 
     33            echo "To: root" 
     34            echo "Subject: Segfault in Cherokee" 
     35            echo 
     36        fi 
     37 
     38        # Find out what binary we're debugging 
    3139        if [ ! -d "/proc/$pid" ]; then 
    3240                echo "$0: No such process: $pid" 
     
    3442        fi 
    3543 
    36         # Find out what binary we're debugging 
    3744        if [ $os = "Linux" ]; then  
    3845             BINARYNAME=`readlink "/proc/$pid/exe"` 
     
    4451        fi 
    4552 
    46         # Generic header for our email 
     53        # Generic header for the report 
    4754        echo "The Cherokee 'panic action' script, $0," 
    4855        echo "was called for pid $pid ($BINARYNAME)." 
     
    102109    case "$action" in 
    103110           mail) 
    104                   mail -s "Segfault in Cherokee" roo
     111                  /usr/sbin/sendmail -
    105112                  ;; 
    106113           cat) 
  • cherokee/trunk/cherokee/server.c

    r913 r918  
    171171        cherokee_buffer_init (&n->listen_to); 
    172172        cherokee_buffer_init (&n->chroot); 
     173 
    173174        cherokee_buffer_init (&n->panic_action); 
     175        cherokee_buffer_add_str (&n->panic_action, CHEROKEE_PANIC_PATH); 
    174176 
    175177        /* Bogo now