Changeset 918
- Timestamp:
- 09/18/07 12:25:00 (1 year ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/cherokee/cherokee-panic (modified) (5 diffs)
- cherokee/trunk/cherokee/server.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r917 r918 1 1 2007-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. 2 10 3 11 * cherokee/cherokee-panic: Fixed typo. It also slightly improves cherokee/trunk/cherokee/cherokee-panic
r917 r918 5 5 # mail - mail the error. You need a working MTA in the system. 6 6 # cat - just print it 7 if [ `which mail`]; then7 if [ -x /usr/sbin/sendmail ]; then 8 8 action=mail 9 9 else … … 29 29 fi 30 30 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 31 39 if [ ! -d "/proc/$pid" ]; then 32 40 echo "$0: No such process: $pid" … … 34 42 fi 35 43 36 # Find out what binary we're debugging37 44 if [ $os = "Linux" ]; then 38 45 BINARYNAME=`readlink "/proc/$pid/exe"` … … 44 51 fi 45 52 46 # Generic header for our email53 # Generic header for the report 47 54 echo "The Cherokee 'panic action' script, $0," 48 55 echo "was called for pid $pid ($BINARYNAME)." … … 102 109 case "$action" in 103 110 mail) 104 mail -s "Segfault in Cherokee" root111 /usr/sbin/sendmail -t 105 112 ;; 106 113 cat) cherokee/trunk/cherokee/server.c
r913 r918 171 171 cherokee_buffer_init (&n->listen_to); 172 172 cherokee_buffer_init (&n->chroot); 173 173 174 cherokee_buffer_init (&n->panic_action); 175 cherokee_buffer_add_str (&n->panic_action, CHEROKEE_PANIC_PATH); 174 176 175 177 /* Bogo now