1
1
/* ___INFO__MARK_BEGIN__*/
2
2
/* ************************************************************************
3
- *
3
+ *
4
4
* The Contents of this file are made available subject to the terms of
5
5
* the Sun Industry Standards Source License Version 1.2
6
- *
6
+ *
7
7
* Sun Microsystems Inc., March, 2001
8
- *
9
- *
8
+ *
9
+ *
10
10
* Sun Industry Standards Source License Version 1.2
11
11
* =================================================
12
12
* The contents of this file are subject to the Sun Industry Standards
13
13
* Source License Version 1.2 (the "License"); You may not use this file
14
14
* except in compliance with the License. You may obtain a copy of the
15
15
* License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
16
- *
16
+ *
17
17
* Software provided under this License is provided on an "AS IS" basis,
18
18
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
19
19
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
20
20
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
21
21
* See the License for the specific provisions governing your rights and
22
22
* obligations concerning the Software.
23
- *
23
+ *
24
24
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
25
- *
25
+ *
26
26
* Copyright: 2001 by Sun Microsystems, Inc.
27
- *
27
+ *
28
28
* All Rights Reserved.
29
- *
29
+ *
30
30
* Portions of this software are Copyright (c) 2023-2024 HPC-Gridware GmbH
31
31
*
32
32
************************************************************************/
@@ -115,7 +115,7 @@ u_long64 get_last_qmaster_register_time() {
115
115
* sge_execd_application_status() -- commlib status callback function
116
116
*
117
117
* SYNOPSIS
118
- * unsigned long sge_execd_application_status(char** info_message)
118
+ * unsigned long sge_execd_application_status(char** info_message)
119
119
*
120
120
* FUNCTION
121
121
* This is the implementation of the commlib application status callback
@@ -138,14 +138,14 @@ u_long64 get_last_qmaster_register_time() {
138
138
* INPUTS
139
139
* char** info_message - pointer to an char* inside commlib.
140
140
* info message must be malloced, commlib will
141
- * free this memory.
141
+ * free this memory.
142
142
* RESULT
143
143
* unsigned long status - status of application
144
144
*
145
145
* NOTES
146
146
* This function is MT save
147
147
*******************************************************************************/
148
- unsigned long sge_execd_application_status (char ** info_message)
148
+ unsigned long sge_execd_application_status (char ** info_message)
149
149
{
150
150
return sge_monitor_status (info_message, 0 );
151
151
}
@@ -177,7 +177,7 @@ int main(int argc, char **argv)
177
177
prof_set_level_name (SGE_PROF_CUSTOM1, " Execd Thread" , nullptr );
178
178
prof_set_level_name (SGE_PROF_CUSTOM2, " Execd Dispatch" , nullptr );
179
179
180
- #ifdef __SGE_COMPILE_WITH_GETTEXT__
180
+ #ifdef __SGE_COMPILE_WITH_GETTEXT__
181
181
/* init language output for gettext() , it will use the right language */
182
182
sge_init_language_func ((gettext_func_type) gettext,
183
183
(setlocale_func_type) setlocale ,
@@ -188,7 +188,7 @@ int main(int argc, char **argv)
188
188
189
189
/* This needs a better solution */
190
190
umask (022 );
191
-
191
+
192
192
/* Initialize path for temporary logging until we chdir to spool */
193
193
my_pid = getpid ();
194
194
snprintf (tmp_err_file_name, sizeof (tmp_err_file_name), " %s." pid_t_fmt, TMP_ERR_FILE_EXECD, my_pid);
@@ -230,7 +230,7 @@ int main(int argc, char **argv)
230
230
}
231
231
232
232
parse_cmdline_execd (argv);
233
-
233
+
234
234
/* exit if we can't get communication handle (bind port) */
235
235
max_enroll_tries = 30 ;
236
236
while (cl_com_get_handle (prognames[EXECD],1 ) == nullptr ) {
@@ -261,8 +261,8 @@ int main(int argc, char **argv)
261
261
}
262
262
263
263
/*
264
- * now the commlib up and running. Set execd application status function
265
- * ( commlib callback function for qping status information response
264
+ * now the commlib up and running. Set execd application status function
265
+ * ( commlib callback function for qping status information response
266
266
* messages (SIRM) )
267
267
*/
268
268
ret_val = cl_com_set_status_func (sge_execd_application_status);
@@ -282,27 +282,27 @@ int main(int argc, char **argv)
282
282
}
283
283
cl_com_free_sirm_message (&status);
284
284
}
285
-
285
+
286
286
/* finalize daemonize */
287
287
if (!getenv (" SGE_ND" )) {
288
288
sge_daemonize_finalize ();
289
289
}
290
290
291
- /* daemonizes if qmaster is unreachable */
291
+ /* daemonizes if qmaster is unreachable */
292
292
sge_setup_sge_execd (tmp_err_file_name);
293
293
294
294
/* are we using qidle or not */
295
295
sge_ls_qidle (mconf_get_use_qidle ());
296
296
sge_ls_gnu_ls (1 );
297
-
297
+
298
298
DPRINTF (" use_qidle: %d\n " , mconf_get_use_qidle ());
299
299
300
300
/* test load sensor (internal or external) */
301
301
{
302
302
lList *report_list = sge_build_load_report (component_get_qualified_hostname (), bootstrap_get_binary_path ());
303
303
lFreeList (&report_list);
304
304
}
305
-
305
+
306
306
/* here we have to wait for qmaster registration */
307
307
while (sge_execd_register_at_qmaster (false ) != 0 ) {
308
308
if (ocs::gdi::ClientBase::sge_get_com_error_flag (EXECD, ocs::gdi::SGE_COM_ACCESS_DENIED, true )) {
@@ -319,7 +319,7 @@ int main(int argc, char **argv)
319
319
sleep (30 );
320
320
}
321
321
322
- /*
322
+ /*
323
323
* Terminate on SIGTERM or hard communication error
324
324
*/
325
325
if (execd_exit_state != 0 || shut_me_down != 0 ) {
@@ -345,7 +345,7 @@ int main(int argc, char **argv)
345
345
*/
346
346
if (!sge_is_start_user_superuser ()) {
347
347
WARNING (SFNMAX, MSG_SWITCH_USER_NOT_ROOT);
348
- }
348
+ }
349
349
350
350
#ifdef COMPILE_DC
351
351
if (ptf_init ()) {
@@ -429,12 +429,12 @@ static void execd_exit_func(int i)
429
429
#ifdef COMPILE_DC
430
430
ptf_stop ();
431
431
#endif
432
-
432
+
433
433
#if defined(SOLARIS)
434
434
if (sge_smf_used () == 1 ) {
435
435
/* We don't do disable on svcadm restart */
436
436
if (sge_strnullcmp (sge_smf_get_instance_state (), SCF_STATE_STRING_ONLINE) == 0 &&
437
- sge_strnullcmp (sge_smf_get_instance_next_state (), SCF_STATE_STRING_NONE) == 0 ) {
437
+ sge_strnullcmp (sge_smf_get_instance_next_state (), SCF_STATE_STRING_NONE) == 0 ) {
438
438
sge_smf_temporary_disable_instance ();
439
439
}
440
440
}
@@ -449,7 +449,7 @@ static void execd_exit_func(int i)
449
449
* sge_execd_register_at_qmaster() -- modify execd list at qmaster site
450
450
*
451
451
* SYNOPSIS
452
- * int sge_execd_register_at_qmaster()
452
+ * int sge_execd_register_at_qmaster()
453
453
*
454
454
* FUNCTION
455
455
* add local execd name to SGE_EH_LIST in order to register at
@@ -462,17 +462,17 @@ static void execd_exit_func(int i)
462
462
* int - 0 = success / 1 = error
463
463
*
464
464
* NOTES
465
- * MT-NOTE: sge_execd_register_at_qmaster() is not MT safe
465
+ * MT-NOTE: sge_execd_register_at_qmaster() is not MT safe
466
466
*
467
467
*******************************************************************************/
468
468
int sge_execd_register_at_qmaster (bool is_restart) {
469
469
int return_value = 0 ;
470
470
static int sge_last_register_error_flag = 0 ;
471
471
lList *alp = nullptr ;
472
472
473
- /*
473
+ /*
474
474
* If it is a reconnect (is_restart is true) the act_qmaster file must be
475
- * re-read in order to update ctx qmaster cache when master migrates.
475
+ * re-read in order to update ctx qmaster cache when master migrates.
476
476
*/
477
477
const char *master_host = ocs::gdi::ClientBase::gdi_get_act_master_host (is_restart);
478
478
@@ -524,7 +524,7 @@ int sge_execd_register_at_qmaster(bool is_restart) {
524
524
return_value = 1 ;
525
525
}
526
526
}
527
-
527
+
528
528
if (return_value == 0 ) {
529
529
sge_last_register_error_flag = 0 ;
530
530
INFO (MSG_EXECD_REGISTERED_AT_QMASTER_S, master_host?master_host:" " );
@@ -545,10 +545,10 @@ static void parse_cmdline_execd(char **argv)
545
545
u_long32 help = 0 ;
546
546
547
547
DENTER (TOP_LAYER);
548
-
548
+
549
549
alp = sge_parse_cmdline_execd (argv+1 , &pcmdline);
550
550
if (alp) {
551
- /*
551
+ /*
552
552
** high level parsing error! show answer list
553
553
*/
554
554
for_each_ep (aep, alp) {
@@ -591,7 +591,7 @@ static void parse_cmdline_execd(char **argv)
591
591
/* -------------------------------------------------------------
592
592
* sge_parse_cmdline_execd
593
593
*
594
- *-------------------------------------------------------------*/
594
+ *-------------------------------------------------------------*/
595
595
static lList *sge_parse_cmdline_execd (char **argv, lList **ppcmdline)
596
596
{
597
597
char **sp;
@@ -629,8 +629,8 @@ lList *alp = nullptr;
629
629
* sge_parse_execd
630
630
*
631
631
*-------------------------------------------------------------*/
632
- static lList *sge_parse_execd (lList **ppcmdline, lList **ppreflist,
633
- u_long32 *help)
632
+ static lList *sge_parse_execd (lList **ppcmdline, lList **ppreflist,
633
+ u_long32 *help)
634
634
{
635
635
lList *alp = nullptr ;
636
636
int usageshowed = 0 ;
@@ -648,7 +648,7 @@ static lList *sge_parse_execd(lList **ppcmdline, lList **ppreflist,
648
648
break ;
649
649
}
650
650
}
651
-
651
+
652
652
if (lGetNumberOfElem (*ppcmdline)) {
653
653
if (!usageshowed) {
654
654
sge_usage (EXECD, stderr);
@@ -668,7 +668,7 @@ static lList *sge_parse_execd(lList **ppcmdline, lList **ppreflist,
668
668
* SYNOPSIS
669
669
* bool
670
670
* execd_get_job_ja_task(u_long32 job_id, u_long32 ja_task_id,
671
- * lListElem **job, lListElem **ja_task)
671
+ * lListElem **job, lListElem **ja_task)
672
672
*
673
673
* FUNCTION
674
674
* Searches the execd master lists for job and ja_task
@@ -684,7 +684,7 @@ static lList *sge_parse_execd(lList **ppcmdline, lList **ppreflist,
684
684
* bool - true if both job and ja_task are found, else false
685
685
*
686
686
* NOTES
687
- * MT-NOTE: execd_get_job_ja_task() is MT safe
687
+ * MT-NOTE: execd_get_job_ja_task() is MT safe
688
688
*******************************************************************************/
689
689
bool execd_get_job_ja_task (u_long32 job_id, u_long32 ja_task_id, lListElem **job, lListElem **ja_task, bool ignore_missing_job_task)
690
690
{
0 commit comments