Projects
Browse Source     Search     Timeline     Wiki

Changeset 23469

Show
Ignore:
Timestamp:
12/19/07 09:40:56 (12 months ago)
Author:
zarzycki@…
Message:

<rdar://problem/5582235> printf output not appearing in console or appearing after app quits

Location:
trunk/launchd/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/launchd/src/launchd_core_logic.c

    r23468 r23469  
    20852085 
    20862086        if (j->log_redirect_fd && !j->legacy_LS_job) { 
    2087                 job_assumes(j, runtime_close(j->log_redirect_fd) != -1); 
    2088                 j->log_redirect_fd = 0; 
     2087                job_log_stdouterr(j); /* one last chance */ 
     2088 
     2089                if (j->log_redirect_fd) { 
     2090                        job_assumes(j, runtime_close(j->log_redirect_fd) != -1); 
     2091                        j->log_redirect_fd = 0; 
     2092                } 
    20892093        } 
    20902094 
  • trunk/launchd/src/launchd_runtime.c

    r23466 r23469  
    11841184 
    11851185        if (!(LOG_MASK(attr->priority) & internal_mask_pri)) { 
    1186                 goto out; 
     1186                return; 
    11871187        } 
    11881188 
     
    11901190                vsnprintf(newmsg, sizeof(newmsg), message, args); 
    11911191                logmsg_add(attr, saved_errno, newmsg); 
    1192                 goto out; 
     1192                return; 
    11931193        } 
    11941194 
     
    12121212 
    12131213        if (ourlogfile == NULL) { 
    1214                 goto out; 
     1214                return; 
    12151215        } 
    12161216 
    12171217        if (message == NULL) { 
    1218                 goto out; 
     1218                return; 
    12191219        } 
    12201220 
     
    12491249 
    12501250        vfprintf(ourlogfile, newmsg, args); 
    1251  
    1252 out: 
    1253         runtime_log_uncork_pending_drain(); 
    12541251} 
    12551252 
     
    13761373                return; 
    13771374        } else if (getpid() == 1) { 
     1375                runtime_log_uncork_pending_drain(); 
    13781376                return; 
    13791377        }