Skip to content

Commit

Permalink
flux-start: set session id to pid of flux-start
Browse files Browse the repository at this point in the history
This applies to local session only:  use pid of flux-start for
session id instead of letting the default of '0' be used.
This allows concurrent local sessions.  Fixes issue flux-framework#13.
  • Loading branch information
garlick committed Oct 17, 2014
1 parent 2b3aafc commit 878361e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cmd/flux-start.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ void start_direct (optparse_t p, const char *cmd)
int rank;
pid_t *pids;
int reaped = 0;
pid_t start_pid = getpid (); /* use as session id */

if (!cmbd_path)
msg_exit ("FLUX_CMBD_PATH is not set");
Expand All @@ -184,6 +185,7 @@ void start_direct (optparse_t p, const char *cmd)
argv_push (&ac, &av, "%s", cmbd_path);
argv_push (&ac, &av, "--size=%d", size);
argv_push (&ac, &av, "--rank=%d", rank);
argv_push (&ac, &av, "--sid=%d", start_pid);
if (cmbd_opts)
push_extra_args (&ac, &av, cmbd_opts);
if (rank == 0 && cmd)
Expand Down

0 comments on commit 878361e

Please sign in to comment.