- Timestamp:
- Dec 17, 2008, 5:13:47 PM (15 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 40c6657
- Parents:
- 1895c29
- git-author:
- Nelson Elhage <nelhage@mit.edu> (12/17/08 12:46:37)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (12/17/08 17:13:47)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
owl.c
rf36cd97 rcf0cc64 54 54 struct termios tio; 55 55 owl_message *m; 56 #if OWL_STDERR_REDIR 57 int newstderr; 58 #endif 59 56 60 57 if (!GLIB_CHECK_VERSION (2, 12, 0)) 61 58 g_error ("GLib version 2.12.0 or above is needed."); … … 210 207 #if OWL_STDERR_REDIR 211 208 /* Do this only after we've started curses up... */ 212 owl_function_debugmsg("startup: doing stderr redirection"); 213 newstderr = stderr_replace(); 214 owl_muxevents_add(owl_global_get_muxevents(&g), newstderr, OWL_MUX_READ, 215 stderr_redirect_handler, NULL); 216 #endif 209 { 210 owl_dispatch *d = owl_malloc(sizeof(owl_dispatch)); 211 owl_function_debugmsg("startup: doing stderr redirection"); 212 d->fd = stderr_replace(); 213 d->cfunc = stderr_redirect_handler; 214 d->destroy = NULL; 215 owl_select_add_dispatch(d); 216 } 217 #endif 217 218 218 219 /* create the owl directory, in case it does not exist */ … … 440 441 newmsgs = 1; 441 442 } 442 443 /* dispatch any muxevents */444 owl_muxevents_dispatch(owl_global_get_muxevents(&g), 0);445 443 446 444 /* follow the last message if we're supposed to */ … … 749 747 750 748 /* Sends stderr (read from rfd) messages to the error console */ 751 void stderr_redirect_handler( int handle, int rfd, int eventmask, void *data)749 void stderr_redirect_handler(owl_dispatch *d) 752 750 { 753 751 int navail, bread; 754 752 char *buf; 755 /*owl_function_debugmsg("stderr_redirect: called with rfd=%d\n", rfd);*/753 int rfd = d->fd; 756 754 if (rfd<0) return; 757 755 if (-1 == ioctl(rfd, FIONREAD, (void*)&navail)) {
Note: See TracChangeset
for help on using the changeset viewer.