Changeset d215ca3f3504e426bb1b8779a7bc391fb19cdfff

Show
Ignore:
Timestamp:
03/25/07 11:56:25 (1 year ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1174816585 +0000
git-parent:

[619f831bebde76ee6582262ac75be923b82615ee]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1174816585 +0000
Message:

Block SIGCHLD so we don't get polluted by system() in another thread[1]
(though this seem to only happen with debuggers and (?)broken OSes)

[1] system() blocks SIGCHLD, and is probably not intended for multithreading

We cannot assume that blocking calls in other libraries ignore EINTR anyway,
so the only safe approach is to block in all threads (you can unblock it in
your thread if you really want it) except the signal handling thread.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/network/io.c

    ref9815a rd215ca3  
    293293        { 
    294294            case -1: 
    295                 if( errno == EINTR ) 
    296                     continue; 
    297295                goto error; 
    298296 
     
    443441        { 
    444442            case -1: 
    445                 if( errno == EINTR ) 
    446                     continue; 
    447443               msg_Err (p_this, "Write error: %s", net_strerror (net_errno)); 
    448444               goto out; 
  • src/vlc.c

    rd789211 rd215ca3  
    104104    static const int sigs[] = { SIGINT, SIGHUP, SIGQUIT, SIGTERM }; 
    105105    /* Ignored signals */ 
    106     static const int ignored[] = { SIGALRM, SIGPIPE }; 
     106    static const int ignored[] = { SIGALRM, SIGPIPE, SIGCHLD }; 
    107107 
    108108    sigset_t set;