441
472
static char *id = "read_config";
445
char line[CONF_LINE_LEN];
447
struct specialconfig {
451
{"clienthost", addclient },
476
char line[CONF_LINE_LEN];
486
{"clienthost", addclient },
452
487
{"restricted", restricted },
456
492
#if !defined(DEBUG) && !defined(NO_SECURITY_CHECK)
457
if (chk_file_sec(file,0,0,S_IWGRP|S_IWOTH,1))
494
if (chk_file_sec(file, 0, 0, S_IWGRP | S_IWOTH, 1, NULL))
463
501
free(maskclient);
467
if ((conf = fopen(file, "r")) == NULL) {
468
log_err(errno, id, "cannot open config file");
471
while (fgets(line, CONF_LINE_LEN, conf)) {
473
if ((line[0] == '#') || (line[0] == '\n'))
474
continue; /* ignore comment & null line */
475
else if (line[0] == '$') { /* special */
477
if ((token = strtok(line, " \t")) == NULL)
479
for (i=0; special[i].name; i++) {
480
if (strcmp(token+1, special[i].name) == 0)
483
if (special[i].name == NULL) {
484
sprintf(log_buffer,"config name %s not known",
486
log_record(PBSEVENT_ERROR,
487
PBS_EVENTCLASS_SERVER,
488
msg_daemonname, log_buffer);
491
token = strtok(NULL, " \t");
492
if (*(token+strlen(token)-1) == '\n')
493
*(token+strlen(token)-1) = '\0';
494
if (special[i].handler(token)) {
500
log_record(PBSEVENT_ERROR, PBS_EVENTCLASS_SERVER,
502
"invalid line in config file");
515
char *id = "restart";
519
log_open(logfile, path_log);
520
sprintf(log_buffer, "restart on signal %d", sig);
522
sprintf(log_buffer, "restart command");
524
log_record(PBSEVENT_SYSTEM, PBS_EVENTCLASS_SERVER, id, log_buffer);
526
if (read_config(configfile) != 0)
535
static char id[] = "badconn";
537
char buf[5*sizeof(addr) + 100];
540
addr = saddr.sin_addr;
541
phe = gethostbyaddr((void *)&addr, sizeof(addr), AF_INET);
547
u_char bb[sizeof(addr)];
551
sprintf(buf, "%u", uu.bb[0]);
552
for(i=1; i<(int)sizeof(addr); i++) {
553
sprintf(hold, ".%u", uu.bb[i]);
558
strncpy(buf, phe->h_name, sizeof(buf));
559
buf[sizeof(buf)-1] = '\0';
562
sprintf(log_buffer, "%s on port %u %s",
563
buf, ntohs(saddr.sin_port), msg);
564
log_err(-1, id, log_buffer);
505
if ((conf = fopen(file, "r")) == NULL)
507
log_err(errno, id, "cannot open config file");
512
while (fgets(line, CONF_LINE_LEN, conf))
515
if ((line[0] == '#') || (line[0] == '\n'))
516
continue; /* ignore comment & null line */
517
else if (line[0] == '$') /* special */
520
if ((token = strtok(line, " \t")) == NULL)
523
for (i = 0; special[i].name; i++)
525
if (strcmp(token + 1, special[i].name) == 0)
529
if (special[i].name == NULL)
531
sprintf(log_buffer, "config name %s not known",
533
log_record(PBSEVENT_ERROR,
534
PBS_EVENTCLASS_SERVER,
535
msg_daemonname, log_buffer);
539
token = strtok(NULL, " \t");
541
if (*(token + strlen(token) - 1) == '\n')
542
*(token + strlen(token) - 1) = '\0';
544
if (special[i].handler(token))
553
log_record(PBSEVENT_ERROR, PBS_EVENTCLASS_SERVER,
555
"invalid line in config file");
569
char *id = "restart";
574
log_open(logfile, path_log);
575
sprintf(log_buffer, "restart on signal %d", sig);
579
sprintf(log_buffer, "restart command");
582
log_record(PBSEVENT_SYSTEM, PBS_EVENTCLASS_SERVER, id, log_buffer);
586
if (read_config(configfile) != 0)
594
static char id[] = "badconn";
597
char buf[5*sizeof(addr) + 100];
601
addr = saddr.sin_addr;
602
phe = gethostbyaddr((void *) & addr, sizeof(addr), AF_INET);
612
u_char bb[sizeof(addr)];
616
sprintf(buf, "%u", uu.bb[0]);
618
for (i = 1; i < (int)sizeof(addr); i++)
620
sprintf(hold, ".%u", uu.bb[i]);
626
strncpy(buf, phe->h_name, sizeof(buf));
627
buf[sizeof(buf)-1] = '\0';
630
sprintf(log_buffer, "%s on port %u %s",
632
buf, ntohs(saddr.sin_port), msg);
633
log_err(-1, id, log_buffer);
685
int go, c, errflg = 0;
690
char *homedir = PBS_SERVER_HOME;
692
char *dbfile = "sched_out";
693
struct sigaction act;
695
caddr_t curr_brk = 0;
698
extern int optind, opterr;
701
int schedinit A_((int argc, char **argv));
702
int schedule A_((int com, int connector));
707
port = get_svrport(PBS_SCHEDULER_SERVICE_NAME, "tcp",
708
PBS_SCHEDULER_SERVICE_PORT);
709
pbs_rm_port = get_svrport(PBS_MANAGER_SERVICE_NAME, "tcp",
710
PBS_MANAGER_SERVICE_PORT);
712
strcpy(pbs_current_user,"Scheduler");
713
msg_daemonname=strdup("pbs_sched");
717
while ((c = getopt(argc, argv, "L:S:R:d:p:c:a:-:")) != EOF) {
720
if ((optarg == NULL) || (optarg[0] == '\0')) {
724
if (!strcmp(optarg,"version")) {
725
fprintf(stderr,"version: %s\n", PACKAGE_VERSION);
738
"%s: illegal port\n", optarg);
743
if ((pbs_rm_port = atoi(optarg)) == 0) {
744
(void)fprintf(stderr, "%s: bad -R %s\n",
759
alarm_time = atoi(optarg);
760
if (alarm_time == 0) {
762
"%s: bad alarm time\n", optarg);
772
fprintf(stderr, "usage: %s %s\n", argv[0], usage);
760
int go, c, errflg = 0;
765
char *homedir = PBS_SERVER_HOME;
767
char *dbfile = "sched_out";
769
struct sigaction act;
771
caddr_t curr_brk = 0;
774
extern int optind, opterr;
778
int schedinit A_((int argc, char **argv));
779
int schedule A_((int com, int connector));
784
/* The following is code to reduce security risks */
785
/* move this to a place where nss_ldap doesn't hold a socket yet */
787
c = sysconf(_SC_OPEN_MAX);
790
(void)close(c); /* close any file desc left open by parent */
792
port = get_svrport(PBS_SCHEDULER_SERVICE_NAME, "tcp",
793
PBS_SCHEDULER_SERVICE_PORT);
795
pbs_rm_port = get_svrport(PBS_MANAGER_SERVICE_NAME, "tcp",
796
PBS_MANAGER_SERVICE_PORT);
798
strcpy(pbs_current_user, "Scheduler");
800
msg_daemonname = strdup("pbs_sched");
804
while ((c = getopt(argc, argv, "L:S:R:d:p:c:a:-:")) != EOF)
811
if ((optarg == NULL) || (optarg[0] == '\0'))
816
if (!strcmp(optarg, "version"))
818
fprintf(stderr, "version: %s\n", PACKAGE_VERSION);
838
"%s: illegal port\n", optarg);
846
if ((pbs_rm_port = atoi(optarg)) == 0)
848
(void)fprintf(stderr, "%s: bad -R %s\n",
868
alarm_time = atoi(optarg);
873
"%s: bad alarm time\n", optarg);
887
fprintf(stderr, "usage: %s %s\n", argv[0], usage);
777
if ((geteuid() != 0) || (getuid() != 0)) {
778
fprintf(stderr, "%s: Must be run by root\n", argv[0]);
892
if ((geteuid() != 0) || (getuid() != 0))
894
fprintf(stderr, "%s: Must be run by root\n", argv[0]);
781
898
#endif /* DEBUG */
783
/* Save the original working directory for "restart" */
784
if ((oldpath = getcwd((char *)NULL, MAXPATHLEN)) == NULL) {
785
fprintf(stderr, "cannot get current working directory\n");
900
/* Save the original working directory for "restart" */
901
if ((oldpath = getcwd((char *)NULL, MAXPATHLEN)) == NULL)
903
fprintf(stderr, "cannot get current working directory\n");
789
(void)sprintf(log_buffer, "%s/sched_priv", homedir);
907
(void)sprintf(log_buffer, "%s/sched_priv", homedir);
790
908
#if !defined(DEBUG) && !defined(NO_SECURITY_CHECK)
791
c = chk_file_sec(log_buffer, 1, 0, S_IWGRP|S_IWOTH, 1);
792
c |= chk_file_sec(PBS_ENVIRON, 0, 0, S_IWGRP|S_IWOTH, 0);
909
c = chk_file_sec(log_buffer, 1, 0, S_IWGRP | S_IWOTH, 1, NULL);
910
c |= chk_file_sec(PBS_ENVIRON, 0, 0, S_IWGRP | S_IWOTH, 0, NULL);
794
914
#endif /* not DEBUG and not NO_SECURITY_CHECK */
795
if (chdir(log_buffer) == -1) {
799
(void)sprintf(path_log, "%s/sched_logs", homedir);
802
/* The following is code to reduce security risks */
803
/* start out with standard umask, system resource limit infinite */
806
if (setup_env(PBS_ENVIRON)==-1)
809
(void)setgroups(1, (gid_t *)&c); /* secure suppl. groups */
810
c = sysconf(_SC_OPEN_MAX);
812
(void)close(c); /* close any file desc left open by parent */
915
if (chdir(log_buffer) == -1)
921
(void)sprintf(path_log, "%s/sched_logs", homedir);
922
(void)sprintf(path_acct, "%s/%s", log_buffer, PBS_ACCT);
925
/* The following is code to reduce security risks */
926
/* start out with standard umask, system resource limit infinite */
930
if (setup_env(PBS_ENVIRON) == -1)
935
(void)setgroups(1, (gid_t *)&c); /* secure suppl. groups */
816
(void)limit(C_JOB, 0, L_CPROC, 0);
817
(void)limit(C_JOB, 0, L_CPU, 0);
818
(void)limit(C_JOBPROCS, 0, L_CPU, 0);
819
(void)limit(C_PROC, 0, L_FD, 255);
820
(void)limit(C_JOB, 0, L_FSBLK, 0);
821
(void)limit(C_JOBPROCS, 0, L_FSBLK, 0);
822
(void)limit(C_JOB, 0, L_MEM , 0);
823
(void)limit(C_JOBPROCS, 0, L_MEM , 0);
824
#else /* not _CRAY */
826
struct rlimit rlimit;
828
rlimit.rlim_cur = RLIM_INFINITY;
829
rlimit.rlim_max = RLIM_INFINITY;
830
(void)setrlimit(RLIMIT_CPU, &rlimit);
831
(void)setrlimit(RLIMIT_FSIZE, &rlimit);
832
(void)setrlimit(RLIMIT_DATA, &rlimit);
833
(void)setrlimit(RLIMIT_STACK, &rlimit);
939
(void)limit(C_JOB, 0, L_CPROC, 0);
941
(void)limit(C_JOB, 0, L_CPU, 0);
943
(void)limit(C_JOBPROCS, 0, L_CPU, 0);
945
(void)limit(C_PROC, 0, L_FD, 255);
947
(void)limit(C_JOB, 0, L_FSBLK, 0);
949
(void)limit(C_JOBPROCS, 0, L_FSBLK, 0);
951
(void)limit(C_JOB, 0, L_MEM , 0);
953
(void)limit(C_JOBPROCS, 0, L_MEM , 0);
955
#else /* not _CRAY */
958
struct rlimit rlimit;
960
rlimit.rlim_cur = RLIM_INFINITY;
961
rlimit.rlim_max = RLIM_INFINITY;
962
(void)setrlimit(RLIMIT_CPU, &rlimit);
963
(void)setrlimit(RLIMIT_FSIZE, &rlimit);
964
(void)setrlimit(RLIMIT_DATA, &rlimit);
965
(void)setrlimit(RLIMIT_STACK, &rlimit);
834
966
#ifdef RLIMIT_RSS
835
(void)setrlimit(RLIMIT_RSS , &rlimit);
967
(void)setrlimit(RLIMIT_RSS , &rlimit);
836
968
#endif /* RLIMIT_RSS */
837
969
#ifdef RLIMIT_VMEM
838
(void)setrlimit(RLIMIT_VMEM , &rlimit);
970
(void)setrlimit(RLIMIT_VMEM , &rlimit);
839
971
#endif /* RLIMIT_VMEM */
841
#endif /* not _CRAY */
844
if (log_open(logfile, path_log) == -1) {
845
fprintf(stderr, "%s: logfile could not be opened\n", argv[0]);
849
if (gethostname(host, sizeof(host)) == -1) {
850
log_err(errno, id, "gethostname");
853
if ((hp =gethostbyname(host)) == NULL) {
854
log_err(errno, id, "gethostbyname");
857
if ((server_sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
858
log_err(errno, id, "socket");
861
if (setsockopt(server_sock, SOL_SOCKET, SO_REUSEADDR,
862
(char *)&t, sizeof(t)) == -1) {
863
log_err(errno, id, "setsockopt");
866
saddr.sin_family = AF_INET;
867
saddr.sin_port = htons(port);
868
memcpy (&saddr.sin_addr, hp->h_addr, hp->h_length);
869
if (bind (server_sock, (struct sockaddr *)&saddr, sizeof(saddr)) < 0) {
870
log_err(errno, id, "bind");
873
if (listen (server_sock, 5) < 0) {
874
log_err(errno, id, "listen");
878
okclients = (pbs_net_t *)calloc(START_CLIENTS, sizeof(pbs_net_t));
879
addclient("localhost"); /* who has permission to call MOM */
882
if (read_config(configfile) != 0)
886
lockfds = open("sched.lock", O_CREAT | O_TRUNC | O_WRONLY, 0644);
888
log_err(errno, id, "open lock file");
891
lock_out(lockfds, F_WRLCK);
894
if (sigemptyset(&allsigs) == -1) {
895
perror("sigemptyset");
898
if (sigprocmask(SIG_SETMASK, &allsigs, NULL) == -1) { /* unblock */
899
perror("sigprocmask");
903
sigaddset(&allsigs, SIGHUP); /* remember to block these */
904
sigaddset(&allsigs, SIGINT); /* during critical sections */
905
sigaddset(&allsigs, SIGTERM); /* so we don't get confused */
906
act.sa_mask = allsigs;
908
act.sa_handler = restart; /* do a restart on SIGHUP */
909
sigaction(SIGHUP, &act, NULL);
911
act.sa_handler = toolong; /* handle an alarm call */
912
sigaction(SIGALRM, &act, NULL);
914
act.sa_handler = die; /* bite the biscuit for all following */
915
sigaction(SIGINT, &act, NULL);
916
sigaction(SIGTERM, &act, NULL);
919
* Catch these signals to ensure we core dump even if
920
* our rlimit for core dumps is set to 0 initially.
922
* Chris Samuel - VPAC
923
* csamuel@vpac.org - 29th July 2003
925
* Now conditional on the PBSCOREDUMP environment variable
928
if (getenv("PBSCOREDUMP"))
930
act.sa_handler = catch_abort; /* make sure we core dump */
932
sigaction(SIGSEGV,&act, NULL);
933
sigaction(SIGBUS, &act, NULL);
934
sigaction(SIGFPE, &act, NULL);
935
sigaction(SIGILL, &act, NULL);
936
sigaction(SIGTRAP,&act, NULL);
937
sigaction(SIGSYS, &act, NULL);
941
* Local initialization stuff
944
if (schedinit(argc, argv)) {
945
(void) sprintf(log_buffer,
946
"local initialization failed, terminating");
947
log_record(PBSEVENT_SYSTEM,PBS_EVENTCLASS_SERVER,id,log_buffer);
951
if (getenv("PBSDEBUG") == NULL)
953
lock_out(lockfds,F_UNLCK);
955
if ((pid = fork()) == -1)
956
{ /* error on fork */
961
else if (pid > 0) /* parent exits */
966
if ((pid = setsid()) == -1)
973
lock_out(lockfds, F_WRLCK);
975
freopen(dbfile, "a", stdout);
977
setvbuf(stdout, NULL, _IOLBF, 0);
979
dup2(fileno(stdout), fileno(stderr));
983
setvbuf(stdout, NULL, _IOLBF, 0);
984
setvbuf(stderr, NULL, _IOLBF, 0);
989
freopen("/dev/null", "r", stdin);
991
/* write scheduler's pid into lockfile */
993
(void)sprintf(log_buffer, "%ld\n", (long)pid);
995
if (write(lockfds, log_buffer, strlen(log_buffer)+1) != (ssize_t)(strlen(log_buffer)+1))
997
perror("writing to lockfile");
973
#endif /* not _CRAY */
976
if (log_open(logfile, path_log) == -1)
978
fprintf(stderr, "%s: logfile could not be opened\n", argv[0]);
982
if (gethostname(host, sizeof(host)) == -1)
984
log_err(errno, id, "gethostname");
988
if ((hp = gethostbyname(host)) == NULL)
990
log_err(errno, id, "gethostbyname");
994
if ((server_sock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
996
log_err(errno, id, "socket");
1000
if (setsockopt(server_sock, SOL_SOCKET, SO_REUSEADDR,
1001
(char *)&t, sizeof(t)) == -1)
1003
log_err(errno, id, "setsockopt");
1007
saddr.sin_family = AF_INET;
1009
saddr.sin_port = htons(port);
1010
memcpy(&saddr.sin_addr, hp->h_addr, hp->h_length);
1012
if (bind(server_sock, (struct sockaddr *)&saddr, sizeof(saddr)) < 0)
1014
log_err(errno, id, "bind");
1018
if (listen(server_sock, 5) < 0)
1020
log_err(errno, id, "listen");
1024
okclients = (pbs_net_t *)calloc(START_CLIENTS, sizeof(pbs_net_t));
1026
addclient("localhost"); /* who has permission to call MOM */
1031
if (read_config(configfile) != 0)
1035
lockfds = open("sched.lock", O_CREAT | O_TRUNC | O_WRONLY, 0644);
1039
log_err(errno, id, "open lock file");
1043
lock_out(lockfds, F_WRLCK);
1047
if (sigemptyset(&allsigs) == -1)
1049
perror("sigemptyset");
1053
if (sigprocmask(SIG_SETMASK, &allsigs, NULL) == -1) /* unblock */
1055
perror("sigprocmask");
1061
sigaddset(&allsigs, SIGHUP); /* remember to block these */
1062
sigaddset(&allsigs, SIGINT); /* during critical sections */
1063
sigaddset(&allsigs, SIGTERM); /* so we don't get confused */
1064
act.sa_mask = allsigs;
1066
act.sa_handler = restart; /* do a restart on SIGHUP */
1067
sigaction(SIGHUP, &act, NULL);
1069
act.sa_handler = toolong; /* handle an alarm call */
1070
sigaction(SIGALRM, &act, NULL);
1072
act.sa_handler = die; /* bite the biscuit for all following */
1073
sigaction(SIGINT, &act, NULL);
1074
sigaction(SIGTERM, &act, NULL);
1077
* Catch these signals to ensure we core dump even if
1078
* our rlimit for core dumps is set to 0 initially.
1080
* Chris Samuel - VPAC
1081
* csamuel@vpac.org - 29th July 2003
1083
* Now conditional on the PBSCOREDUMP environment variable
1086
if (getenv("PBSCOREDUMP"))
1088
act.sa_handler = catch_abort; /* make sure we core dump */
1090
sigaction(SIGSEGV, &act, NULL);
1091
sigaction(SIGBUS, &act, NULL);
1092
sigaction(SIGFPE, &act, NULL);
1093
sigaction(SIGILL, &act, NULL);
1094
sigaction(SIGTRAP, &act, NULL);
1095
sigaction(SIGSYS, &act, NULL);
1099
* Local initialization stuff
1102
if (schedinit(argc, argv))
1104
(void) sprintf(log_buffer,
1105
"local initialization failed, terminating");
1106
log_record(PBSEVENT_SYSTEM, PBS_EVENTCLASS_SERVER, id, log_buffer);
1110
if (getenv("PBSDEBUG") == NULL)
1112
lock_out(lockfds, F_UNLCK);
1114
if ((pid = fork()) == -1)
1121
else if (pid > 0) /* parent exits */
1126
if ((pid = setsid()) == -1)
1133
lock_out(lockfds, F_WRLCK);
1135
if (!freopen(dbfile, "a", stdout)) {
1136
perror("lockout, attempting to freopen dbfile");
1140
setvbuf(stdout, NULL, _IOLBF, 0);
1142
dup2(fileno(stdout), fileno(stderr));
1146
setvbuf(stdout, NULL, _IOLBF, 0);
1147
setvbuf(stderr, NULL, _IOLBF, 0);
1152
if (!freopen("/dev/null", "r", stdin)) {
1153
perror("lockout, attempting to freopen /dev/null");
1157
/* write scheduler's pid into lockfile */
1159
(void)sprintf(log_buffer, "%ld\n", (long)pid);
1161
if (write(lockfds, log_buffer, strlen(log_buffer) + 1) != (ssize_t)(strlen(log_buffer) + 1))
1163
perror("writing to lockfile");
1002
1168
#if (PLOCK_DAEMONS & 2)
1003
(void)plock(PROCLOCK); /* lock daemon into memory */
1169
(void)plock(PROCLOCK); /* lock daemon into memory */
1006
sprintf(log_buffer, "%s startup pid %ld", argv[0], (long)pid);
1007
log_record(PBSEVENT_SYSTEM, PBS_EVENTCLASS_SERVER, id, log_buffer);
1014
FD_SET(rpp_fd, &fdset);
1015
FD_SET(server_sock, &fdset);
1016
if (select(FD_SETSIZE, &fdset, NULL, NULL, NULL) == -1) {
1017
if (errno != EINTR) {
1018
log_err(errno, id, "select");
1024
if (rpp_fd != -1 && FD_ISSET(rpp_fd, &fdset)) {
1026
log_err(errno, id, "rpp_io");
1028
if (!FD_ISSET(server_sock, &fdset))
1031
cmd = server_command();
1032
if (sigprocmask(SIG_BLOCK, &allsigs, &oldsigs) == -1)
1033
log_err(errno, id, "sigprocmaskSIG_BLOCK)");
1036
if (schedule(cmd, connector)) /* magic happens here */
1040
if (connector >= 0 && server_disconnect(connector)) {
1041
log_err(errno, id, "server_disconnect");
1044
next_brk = (caddr_t)sbrk(0);
1045
if (next_brk > curr_brk) {
1046
sprintf(log_buffer, "brk point %ld", (long)next_brk);
1047
log_record(PBSEVENT_DEBUG, PBS_EVENTCLASS_SERVER,
1049
curr_brk = next_brk;
1051
if (sigprocmask(SIG_SETMASK, &oldsigs, NULL) == -1)
1052
log_err(errno, id, "sigprocmask(SIG_SETMASK)");
1055
sprintf(log_buffer, "%s normal finish pid %ld", argv[0], (long)pid);
1056
log_record(PBSEVENT_SYSTEM, PBS_EVENTCLASS_SERVER, id, log_buffer);
1058
(void)close(server_sock);
1173
sprintf(log_buffer, "%s startup pid %ld", argv[0], (long)pid);
1175
log_record(PBSEVENT_SYSTEM, PBS_EVENTCLASS_SERVER, id, log_buffer);
1184
FD_SET(rpp_fd, &fdset);
1186
FD_SET(server_sock, &fdset);
1188
if (select(FD_SETSIZE, &fdset, NULL, NULL, NULL) == -1)
1192
log_err(errno, id, "select");
1199
if (rpp_fd != -1 && FD_ISSET(rpp_fd, &fdset))
1202
log_err(errno, id, "rpp_io");
1205
if (!FD_ISSET(server_sock, &fdset))
1208
cmd = server_command();
1210
if (sigprocmask(SIG_BLOCK, &allsigs, &oldsigs) == -1)
1211
log_err(errno, id, "sigprocmaskSIG_BLOCK)");
1215
if (schedule(cmd, connector)) /* magic happens here */
1220
if (connector >= 0 && server_disconnect(connector))
1222
log_err(errno, id, "server_disconnect");
1226
next_brk = (caddr_t)sbrk(0);
1228
if (next_brk > curr_brk)
1230
sprintf(log_buffer, "brk point %ld", (long)next_brk);
1231
log_record(PBSEVENT_DEBUG, PBS_EVENTCLASS_SERVER,
1233
curr_brk = next_brk;
1236
if (sigprocmask(SIG_SETMASK, &oldsigs, NULL) == -1)
1237
log_err(errno, id, "sigprocmask(SIG_SETMASK)");
1240
sprintf(log_buffer, "%s normal finish pid %ld",
1245
log_record(PBSEVENT_SYSTEM, PBS_EVENTCLASS_SERVER, id, log_buffer);