File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ execution of the job:
7171 * change working directory to the cwd of the job
7272 * enter a barrier to ensure shell initialization is complete on all shells
7373 * emit ``shell.init `` event to exec.eventlog
74+ * call ``shell.post-init `` plugin callbacks
7475 * create all local tasks. For each task, the following procedure is used
7576
7677 - call ``task.init `` plugin callback
@@ -142,6 +143,10 @@ topics:
142143 **jobspec ** and **R ** from the KVS, but before any tasks
143144 are started.
144145
146+ **shell.post-init **
147+ Called after the shell initialization barrier has completed, but
148+ before starting any tasks.
149+
145150**task.init **
146151 Called for each task after the task info has been constructed
147152 but before the task is executed.
Original file line number Diff line number Diff line change @@ -1387,6 +1387,11 @@ static int shell_init (flux_shell_t *shell)
13871387 return plugstack_call (shell -> plugstack , "shell.init" , NULL );
13881388}
13891389
1390+ static int shell_post_init (flux_shell_t * shell )
1391+ {
1392+ return plugstack_call (shell -> plugstack , "shell.post-init" , NULL );
1393+ }
1394+
13901395static int shell_task_init (flux_shell_t * shell )
13911396{
13921397 return plugstack_call (shell -> plugstack , "task.init" , NULL );
@@ -1618,6 +1623,11 @@ int main (int argc, char *argv[])
16181623 && shell_eventlogger_emit_event (shell .ev , "shell.init" ) < 0 )
16191624 shell_die_errno (1 , "failed to emit event shell.init" );
16201625
1626+ /* Call shell.post-init plugins.
1627+ */
1628+ if (shell_post_init (& shell ) < 0 )
1629+ shell_die_errno (1 , "shell_post_init" );
1630+
16211631 /* Create tasks
16221632 */
16231633 if (!(shell .tasks = zlist_new ()))
You can’t perform that action at this time.
0 commit comments