Ignore:
Timestamp:
Jul 11, 2008, 1:13:42 AM (17 years ago)
Author:
Paul Smedley
Message:

Update branch to 3.0.31 release

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/nsswitch/winbindd.c

    r134 r140  
    118118/* Handle the signal by unlinking socket and exiting */
    119119
    120 static void terminate(void)
    121 {
    122         pstring path;
    123 
    124         /* Remove socket file */
    125         pstr_sprintf(path, "%s/%s",
    126                  WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME);
    127         unlink(path);
     120static void terminate(bool in_parent)
     121{
     122        if (in_parent) {
     123                /* When parent goes away we should
     124                 * remove the socket file. Not so
     125                 * when children terminate.
     126                 */
     127
     128                pstring path;
     129
     130                /* Remove socket file */
     131                pstr_sprintf(path, "%s/%s",
     132                        WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME);
     133                unlink(path);
     134        }
    128135
    129136        idmap_close();
     
    732739
    733740/* check if TERM has been received */
    734 void winbind_check_sigterm(void)
     741void winbind_check_sigterm(bool in_parent)
    735742{
    736743        if (do_sigterm)
    737                 terminate();
     744                terminate(in_parent);
    738745}
    739746
     
    902909        /* Check signal handling things */
    903910
    904         winbind_check_sigterm();
     911        winbind_check_sigterm(true);
    905912        winbind_check_sighup();
    906913
Note: See TracChangeset for help on using the changeset viewer.