{"action":"created","issue":{"url":"https://api.github.com/repos/flux-framework/flux-core/issues/274","labels_url":"https://api.github.com/repos/flux-framework/flux-core/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/flux-framework/flux-core/issues/274/comments","events_url":"https://api.github.com/repos/flux-framework/flux-core/issues/274/events","html_url":"https://github.com/flux-framework/flux-core/issues/274","id":95745006,"number":274,"title":"Communicate with a local flux instance from outside any child program","user":{"login":"grondo","id":741970,"avatar_url":"https://avatars.githubusercontent.com/u/741970?v=3","gravatar_id":"","url":"https://api.github.com/users/grondo","html_url":"https://github.com/grondo","followers_url":"https://api.github.com/users/grondo/followers","following_url":"https://api.github.com/users/grondo/following{/other_user}","gists_url":"https://api.github.com/users/grondo/gists{/gist_id}","starred_url":"https://api.github.com/users/grondo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grondo/subscriptions","organizations_url":"https://api.github.com/users/grondo/orgs","repos_url":"https://api.github.com/users/grondo/repos","events_url":"https://api.github.com/users/grondo/events{/privacy}","received_events_url":"https://api.github.com/users/grondo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-17T21:06:59Z","updated_at":"2015-07-17T22:53:57Z","closed_at":null,"body":"I struggled with the title of this issue a bit, someone please help me call it something more appropriate.\r\n\r\nFrom #236, the need has come up to communicate with a test session from outside the 'initial program'  script. At this time, this is done by grabbing `FLUX_TMPDIR` from a target `flux-broker` process, but we should probably have a more reliable and less icky way to do this. Also, in the future, a flux instance  may be inside a container and `FLUX_TMPDIR` may not be sufficient to connect to a running flux broker.\r\n\r\nLong term, the plan for this was always to have outward facing services for a flux instance (e.g. REST interface, krb5 connector, etc.) However, one idea for the short term was to allow named sessions for `flux-start` (like `tmux -s`) and add a `flux` subcommand for running a process with proper environment  for a named session (like `tmux -s <name> send-keys \"$cmd\" Enter`??)"},"comment":{"url":"https://api.github.com/repos/flux-framework/flux-core/issues/comments/122439472","html_url":"https://github.com/flux-framework/flux-core/issues/274#issuecomment-122439472","issue_url":"https://api.github.com/repos/flux-framework/flux-core/issues/274","id":122439472,"user":{"login":"garlick","id":169947,"avatar_url":"https://avatars.githubusercontent.com/u/169947?v=3","gravatar_id":"","url":"https://api.github.com/users/garlick","html_url":"https://github.com/garlick","followers_url":"https://api.github.com/users/garlick/followers","following_url":"https://api.github.com/users/garlick/following{/other_user}","gists_url":"https://api.github.com/users/garlick/gists{/gist_id}","starred_url":"https://api.github.com/users/garlick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garlick/subscriptions","organizations_url":"https://api.github.com/users/garlick/orgs","repos_url":"https://api.github.com/users/garlick/repos","events_url":"https://api.github.com/users/garlick/events{/privacy}","received_events_url":"https://api.github.com/users/garlick/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T22:53:57Z","updated_at":"2015-07-17T22:53:57Z","body":"This is what I was talking about above\r\n```\r\n#!/bin/bash\r\nfor job in ${FLUX_TMPDIR:-${TMPDIR:-/tmp}}/flux-*-0; do\r\n    if test -r $job/broker.pid; then\r\n        kill -0 $(cat $job/broker.pid) 2>/dev/null && echo local://$job\r\n    fi\r\ndone\r\n```\r\n\r\nI guess that could take a pid argument and find the matching broker.pid?"}}