Re: [9fans] query on styxlisten (Inferno) and mount (Linux)? - Plan9

This is a discussion on Re: [9fans] query on styxlisten (Inferno) and mount (Linux)? - Plan9 ; > ; styxlisten -A tcp!*!5901 { export '#U*/home/user & } > in the inferno window We invoke styxlisten something like: styxlisten -A tcp!*!564 export '#U' This exports the entire Inferno root. Styxlisten will start a listener and return, so I ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: [9fans] query on styxlisten (Inferno) and mount (Linux)?

  1. Re: [9fans] query on styxlisten (Inferno) and mount (Linux)?

    > ; styxlisten -A tcp!*!5901 { export '#U*/home/user & }
    > in the inferno window


    We invoke styxlisten something like:

    styxlisten -A tcp!*!564 export '#U'

    This exports the entire Inferno root. Styxlisten will start a
    listener and return, so I don't think you need the "&". 564 is the
    usual 9p port.

    You can export pieces of the inferno root namespace, rather than the
    whole thing, by appending an (inferno-rooted) path to the command.


    >
    > and tried to mount it in a Linux window as:
    >
    > # mount -9p /mnt -o
    > trans=tcp,port=5901


    mount -t 9p /mnt/n/infernohost

    Gets us hooked up from linux to the inferno 9p service started above;
    we don't feed any options to the mount command for this kind of use.

    >
    > the mount hangs


    I don't think it hangs -- I think you have a missing "'" in your
    original styxlisten command, and then background it with "&", so you
    don't see that it hasn't started running.

    --
    Josh


  2. Re: [9fans] query on styxlisten (Inferno) and mount (Linux)?

    > This exports the entire Inferno root. Styxlisten will start a
    > listener and return, so I don't think you need the "&". 564 is the
    > usual 9p port.


    it might be worth noting that when the command run by
    styxlisten exits, styxlisten kills the listener, assuming the
    command is no longer around to take calls.

    FWIW, for a simple export, i usually do the equivalent:

    listen addr {export /&}

    in this case the & is necessary, as listen doesn't listen
    for any more calls while the command is running.
    this is actually useful behaviour - when i want to mount
    the namespace of a machine i can't run a listener on
    (e.g. because some firewall blocks incoming calls)
    i can do:

    listen -s addr {mount -A /fd/0 /n/remote; raise break}

    and on the exporting machine:

    dial addr {export /&}

    it's quite flexible.

+ Reply to Thread