Print this page
NEX-16805 Add smbutil discon command
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fs.d/smbclnt/smbiod-svc/smbiod-svc.c
          +++ new/usr/src/cmd/fs.d/smbclnt/smbiod-svc/smbiod-svc.c
↓ open down ↓ 552 lines elided ↑ open up ↑
 553  553                      uid, (int)pid);
 554  554  
 555  555          snprintf(door_file, sizeof (door_file),
 556  556              SMBIOD_RUNDIR "/%d", uid);
 557  557          unlink(door_file);
 558  558  
 559  559          if (WIFEXITED(status)) {
 560  560                  x = WEXITSTATUS(status);
 561  561                  if (x != 0) {
 562  562                          fprintf(stderr,
 563      -                            "uid %d, pid %d exit %d",
      563 +                            "uid %d, pid %d exit %d\n",
 564  564                              uid, (int)pid, x);
 565  565                  }
 566  566          }
 567  567          if (WIFSIGNALED(status)) {
 568  568                  x = WTERMSIG(status);
 569  569                  fprintf(stderr,
 570      -                    "uid %d, pid %d signal %d",
      570 +                    "uid %d, pid %d signal %d\n",
 571  571                      uid, (int)pid, x);
 572  572          }
 573  573  }
 574  574  
 575  575  /*
 576  576   * Final cleanup before exit.  Unlink child doors, etc.
 577  577   * Called while single threaded, so no locks needed here.
 578  578   * The list is normally empty by now due to svc_sigchld
 579  579   * calls during shutdown.  But in case there were any
 580  580   * straglers, do cleanup here.  Don't bother freeing any
↓ open down ↓ 11 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX