From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <1909624.IyeLYgNJ9F@coil> References: <1909624.IyeLYgNJ9F@coil> From: "James A. Robinson" Date: Mon, 2 Sep 2013 08:25:30 -0700 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=f46d043c7e60216e6b04e56831e9 Subject: Re: [9fans] reading addr always returns #0,#0? Topicbox-Message-UUID: 790697c6-ead8-11e9-9d60-3106f5b1d025 --f46d043c7e60216e6b04e56831e9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank you both for the explanation! On Mon, Sep 2, 2013 at 3:38 AM, dexen deVries wrot= e: > On Monday 02 of September 2013 14:13:56 Alexander Sychev wrote: > > The problem is the "addr" file is closed between your calls. When you > open > > the "addr" file next time, an internal address is set to 0,0. > > But after the writing the address is actual and if you read "data" file > you > > will see the text according to your address. > > > > I you write the code on C or Go without a closing a descriptor of "addr= " > > file, everything will be ok :-) > > > or use 9p rdwr: > > > echo -n , | 9p write acme/2/addr > echo 'dot=3Daddr' | 9p rdwr acme/2/ctl > > -- > dexen deVries > > [[[=E2=86=93][=E2=86=92]]] > > Take care of the luxuries and the necessities will take care of themselve= s. > -- L. Long > > > --f46d043c7e60216e6b04e56831e9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thank you both for the explanation!


On Mon, Sep 2, 2013 at 3:3= 8 AM, dexen deVries <dexen.devries@gmail.com> wrote:
On Monday 02 of September = 2013 14:13:56 Alexander Sychev wrote:
> The problem is the "addr" file is closed between your calls.= When you open
> the "addr" file next time, an internal address is set to 0,0= .
> But after the writing the address is actual and if you read "data= " file you
> will see the text according to your address.
>
> I you write the code on C or Go without a closing a descriptor of &quo= t;addr"
> file, everything will be ok :-)


or use 9p rdwr:


echo -n , | 9p write acme/2/addr
echo 'dot=3Daddr' | 9p rdwr acme/2/ctl

--
dexen deVries

[[[=E2=86=93][=E2=86=92]]]

Take care of the luxuries and the necessities will take care of themselves.=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -- L. Long



--f46d043c7e60216e6b04e56831e9--