PIN(1)                                                     PIN(1)

     NAME
          pin - pinned I/O shell

     SYNOPSIS
          pin [ -acw ] [ -m mtpt ] [ -s mq ] [ id ] [ command ]

     DESCRIPTION
          Pin manages persistent sessions for long-running commands.
          It is used to create, join, and control sessions for pro-
          grams connected to a named mq(4) stream group.

          The -c flag creates a session id running command, or rc -i
          if command is not given.

          The -a flag attaches to a session id.

          The -w flag writes the command string, or standard input if
          not given, to a session's input stream.

          Under the hood, pin expects an mq(4) instance mounted on
          /n/pin or mtpt in case the -m option is given.  If no such
          mount is present, pin mounts the channel posted on
          /srv/pin-$user or /srv/$mq in case the -s option is given,
          creating it if needed.

     EXAMPLES
          Pin an rc(1) shell and attach to it
               pin -ca myshell

          Pin another program
               pin -c remote rcpu -h remote

          Send input to a pinned program
               pin -w myshell echo 'hi, shell'
          or
               echo 'echo hi, shell' | pin -w myshell

     SEE ALSO
          mq(4)

     SOURCE
          git://src.a-b.xyz/mq

     BUGS