Ignore:
Timestamp:
May 27, 2009, 9:09:42 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/winbindd/winbindd.c

    r228 r232  
    171171}
    172172
    173 static bool do_sigterm;
     173static SIG_ATOMIC_T do_sigterm = 0;
    174174
    175175static void termination_handler(int signum)
    176176{
    177         do_sigterm = True;
     177        do_sigterm = 1;
    178178        sys_select_signal(signum);
    179179}
    180180
    181 static bool do_sigusr2;
     181static SIG_ATOMIC_T do_sigusr2 = 0;
    182182
    183183static void sigusr2_handler(int signum)
    184184{
    185         do_sigusr2 = True;
     185        do_sigusr2 = 1;
    186186        sys_select_signal(SIGUSR2);
    187187}
    188188
    189 static bool do_sighup;
     189static SIG_ATOMIC_T do_sighup = 0;
    190190
    191191static void sighup_handler(int signum)
    192192{
    193         do_sighup = True;
     193        do_sighup = 1;
    194194        sys_select_signal(SIGHUP);
    195195}
    196196
    197 static bool do_sigchld;
     197static SIG_ATOMIC_T do_sigchld = 0;
    198198
    199199static void sigchld_handler(int signum)
    200200{
    201         do_sigchld = True;
     201        do_sigchld = 1;
    202202        sys_select_signal(SIGCHLD);
    203203}
     
    222222                         DATA_BLOB *data)
    223223{
    224         do_sigterm = True;
     224        do_sigterm = 1;
    225225}
    226226
     
    747747{
    748748        char c = 0;
     749        int nwritten;
    749750
    750751        /* It's a dead client - hold a funeral */
     
    755756
    756757        /* tell client, we are closing ... */
    757         write(state->sock, &c, sizeof(c));
     758        nwritten = write(state->sock, &c, sizeof(c));
     759        if (nwritten == -1) {
     760                DEBUG(2, ("final write to client failed: %s\n",
     761                          strerror(errno)));
     762        }
    758763
    759764        /* Close socket */
     
    823828                reload_services_file(logfile);
    824829
    825                 do_sighup = False;
     830                do_sighup = 0;
    826831        }
    827832}
     
    9981003        if (do_sigusr2) {
    9991004                print_winbindd_status();
    1000                 do_sigusr2 = False;
     1005                do_sigusr2 = 0;
    10011006        }
    10021007
     
    10041009                pid_t pid;
    10051010
    1006                 do_sigchld = False;
     1011                do_sigchld = 0;
    10071012
    10081013                while ((pid = sys_waitpid(-1, NULL, WNOHANG)) > 0) {
     
    12181223        TimeInit();
    12191224
    1220         if (!reinit_after_fork(winbind_messaging_context(), false)) {
     1225        /* Don't use winbindd_reinit_after_fork here as
     1226         * we're just starting up and haven't created any
     1227         * winbindd-specific resources we must free yet. JRA.
     1228         */
     1229
     1230        if (!reinit_after_fork(winbind_messaging_context(),
     1231                               winbind_event_context(), false)) {
    12211232                DEBUG(0,("reinit_after_fork() failed\n"));
    12221233                exit(1);
Note: See TracChangeset for help on using the changeset viewer.