- Timestamp:
- Mar 1, 2004, 12:42:56 PM (20 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 948b942
- Parents:
- c61918e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
owl.c
r5d365f6 rafbf668 57 57 #endif 58 58 int stderr_replace(void); 59 void stderr_redirect(int rfd);60 59 #endif 61 60 … … 196 195 owl_function_debugmsg("startup: doing stderr redirection"); 197 196 newstderr = stderr_replace(); 197 owl_muxevents_add(owl_global_get_muxevents(&g), newstderr, OWL_MUX_READ, 198 stderr_redirect_handler, NULL); 198 199 #endif 199 200 … … 579 580 } 580 581 } 582 583 /* dispatch any muxevents */ 584 owl_muxevents_dispatch(owl_global_get_muxevents(&g), 0); 581 585 582 586 /* follow the last message if we're supposed to */ … … 665 669 } 666 670 667 #if OWL_STDERR_REDIR668 stderr_redirect(newstderr);669 #endif670 671 671 /* Log any error signals */ 672 672 { … … 675 675 if ((signum = owl_global_get_errsignal_and_clear(&g, &si)) > 0) { 676 676 owl_function_error("Got unexpected signal: %d %s (code: %d band: %d errno: %d)", 677 signum, signum==SIGPIPE?"SIGPIPE":" ",677 signum, signum==SIGPIPE?"SIGPIPE":"SIG????", 678 678 si.si_code, si.si_band, si.si_errno); 679 679 } … … 690 690 */ 691 691 owl_function_resize(); 692 } else if (sig==SIGPIPE ) {692 } else if (sig==SIGPIPE || sig==SIGCHLD) { 693 693 /* Set a flag and some info that we got the sigpipe 694 694 * so we can record that we got it and why... */ … … 732 732 } 733 733 734 /* Sends stderr (read from rfd) messages to a file */735 void stderr_redirect (int rfd)734 /* Sends stderr (read from rfd) messages to the error console */ 735 void stderr_redirect_handler(int handle, int rfd, int eventmask, void *data) 736 736 { 737 737 int navail, bread;
Note: See TracChangeset
for help on using the changeset viewer.