… | |
… | |
289 | delete keyboard; |
289 | delete keyboard; |
290 | #endif |
290 | #endif |
291 | } |
291 | } |
292 | |
292 | |
293 | void |
293 | void |
|
|
294 | rxvt_term::child_exit () |
|
|
295 | { |
|
|
296 | cmd_pid = 0; |
|
|
297 | |
|
|
298 | if (!(options & Opt_hold)) |
|
|
299 | destroy (); |
|
|
300 | } |
|
|
301 | |
|
|
302 | void |
294 | rxvt_term::destroy () |
303 | rxvt_term::destroy () |
295 | { |
304 | { |
296 | if (destroy_ev.active) |
305 | if (destroy_ev.active) |
297 | return; |
306 | return; |
298 | |
307 | |
… | |
… | |
522 | |
531 | |
523 | while ((pid = waitpid (-1, NULL, WNOHANG)) > 0) |
532 | while ((pid = waitpid (-1, NULL, WNOHANG)) > 0) |
524 | for (rxvt_term **t = rxvt_term::termlist.begin (); t < rxvt_term::termlist.end (); t++) |
533 | for (rxvt_term **t = rxvt_term::termlist.begin (); t < rxvt_term::termlist.end (); t++) |
525 | if (pid == (*t)->cmd_pid) |
534 | if (pid == (*t)->cmd_pid) |
526 | { |
535 | { |
527 | (*t)->destroy (); |
536 | (*t)->child_exit (); |
528 | break; |
537 | break; |
529 | } |
538 | } |
530 | } |
539 | } |
531 | |
540 | |
532 | /* |
541 | /* |