* Re: [9fans] two questions about go in Plan 9
@ 2013-02-18 18:12 Francisco J Ballesteros
2013-02-18 18:22 ` Matthew Veety
2013-02-18 18:56 ` Akshat Kumar
0 siblings, 2 replies; 11+ messages in thread
From: Francisco J Ballesteros @ 2013-02-18 18:12 UTC (permalink / raw)
To: 9fans
I know, but, what's the std way to do that in go in plan 9?
On Feb 18, 2013, at 7:07 PM, cinap_lenrek@gmx.de wrote:
> network connections on plan9 can be hanged up by writing "hangup" into
> the corresponding ctl file.
>
> --
> cinap
>
> [/mail/box/nemo/msgs/201302/897]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] two questions about go in Plan 9
2013-02-18 18:12 [9fans] two questions about go in Plan 9 Francisco J Ballesteros
@ 2013-02-18 18:22 ` Matthew Veety
2013-02-18 18:56 ` Akshat Kumar
1 sibling, 0 replies; 11+ messages in thread
From: Matthew Veety @ 2013-02-18 18:22 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
That's how I do it usually.
On Feb 18, 2013, at 13:12, Francisco J Ballesteros <nemo@lsub.org> wrote:
> I know, but, what's the std way to do that in go in plan 9?
>
> On Feb 18, 2013, at 7:07 PM, cinap_lenrek@gmx.de wrote:
>
>> network connections on plan9 can be hanged up by writing "hangup" into
>> the corresponding ctl file.
>>
>> --
>> cinap
>>
>> [/mail/box/nemo/msgs/201302/897]
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] two questions about go in Plan 9
2013-02-18 18:12 [9fans] two questions about go in Plan 9 Francisco J Ballesteros
2013-02-18 18:22 ` Matthew Veety
@ 2013-02-18 18:56 ` Akshat Kumar
1 sibling, 0 replies; 11+ messages in thread
From: Akshat Kumar @ 2013-02-18 18:56 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
In order to deal with Conn types, you're supposed to just
use the interface's functions. Unfortunately, Conn's
Close() simply closes the associated fd. I think in general,
this is fine. For the Listener, a Close() will do the hangup.
I'm updating the net package implementation for Plan 9,
so new ideas are welcome in this phase. We can try to
export a Hangup() function for Plan 9 for the Conn type
(or for individual implementations of the type).
On 18 February 2013 10:12, Francisco J Ballesteros <nemo@lsub.org> wrote:
> I know, but, what's the std way to do that in go in plan 9?
>
> On Feb 18, 2013, at 7:07 PM, cinap_lenrek@gmx.de wrote:
>
>> network connections on plan9 can be hanged up by writing "hangup" into
>> the corresponding ctl file.
>>
>> --
>> cinap
>>
>> [/mail/box/nemo/msgs/201302/897]
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] two questions about go in Plan 9
@ 2013-02-18 19:04 Nemo
2013-02-18 21:39 ` Skip Tavakkolian
0 siblings, 1 reply; 11+ messages in thread
From: Nemo @ 2013-02-18 19:04 UTC (permalink / raw)
To: 9fans
yes. that was the problem.
perhaps exporting hangup would be
fine.
or perhaps a close in a tcp stream
should also interrupt the reader in
plan9, if any.
thanks
On Feb 18, 2013, at 7:58 PM, akumar@mail.nanosouffle.net wrote:
> In order to deal with Conn types, you're supposed to just
> use the interface's functions. Unfortunately, Conn's
> Close() simply closes the associated fd. I think in general,
> this is fine. For the Listener, a Close() will do the hangup.
>
> I'm updating the net package implementation for Plan 9,
> so new ideas are welcome in this phase. We can try to
> export a Hangup() function for Plan 9 for the Conn type
> (or for individual implementations of the type).
>
> On 18 February 2013 10:12, Francisco J Ballesteros <nemo@lsub.org> wrote:
>> I know, but, what's the std way to do that in go in plan 9?
>>
>> On Feb 18, 2013, at 7:07 PM, cinap_lenrek@gmx.de wrote:
>>
>>> network connections on plan9 can be hanged up by writing "hangup" into
>>> the corresponding ctl file.
>>>
>>> --
>>> cinap
>>>
>>> [/mail/box/nemo/msgs/201302/897]
>
> [/mail/box/nemo/msgs/201302/902]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] two questions about go in Plan 9
2013-02-18 19:04 Nemo
@ 2013-02-18 21:39 ` Skip Tavakkolian
0 siblings, 0 replies; 11+ messages in thread
From: Skip Tavakkolian @ 2013-02-18 21:39 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
i think linux and windows both distinguish between allowing io to
complete or not via shutdown() and close() respectively (close causes
a RST instead of FIN).
if my understanding is correct, then: netFD.CloseRead and CloseWrite
for Plan 9 will work by just closing the ctl and data fd's;
netFD.Close should write "hangup" to ctl and SetLinger could easily be
implemented (it returns EPLAN9 on the Go version I'm using -- tip from
a few days ago).
-Skip
On Mon, Feb 18, 2013 at 11:04 AM, Nemo <nemo@lsub.org> wrote:
> yes. that was the problem.
> perhaps exporting hangup would be
> fine.
>
> or perhaps a close in a tcp stream
> should also interrupt the reader in
> plan9, if any.
>
> thanks
>
> On Feb 18, 2013, at 7:58 PM, akumar@mail.nanosouffle.net wrote:
>
>> In order to deal with Conn types, you're supposed to just
>> use the interface's functions. Unfortunately, Conn's
>> Close() simply closes the associated fd. I think in general,
>> this is fine. For the Listener, a Close() will do the hangup.
>>
>> I'm updating the net package implementation for Plan 9,
>> so new ideas are welcome in this phase. We can try to
>> export a Hangup() function for Plan 9 for the Conn type
>> (or for individual implementations of the type).
>>
>> On 18 February 2013 10:12, Francisco J Ballesteros <nemo@lsub.org> wrote:
>>> I know, but, what's the std way to do that in go in plan 9?
>>>
>>> On Feb 18, 2013, at 7:07 PM, cinap_lenrek@gmx.de wrote:
>>>
>>>> network connections on plan9 can be hanged up by writing "hangup" into
>>>> the corresponding ctl file.
>>>>
>>>> --
>>>> cinap
>>>>
>>>> [/mail/box/nemo/msgs/201302/897]
>>
>> [/mail/box/nemo/msgs/201302/902]
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] two questions about go in Plan 9
@ 2013-02-18 17:43 Nemo
2013-02-18 18:05 ` cinap_lenrek
0 siblings, 1 reply; 11+ messages in thread
From: Nemo @ 2013-02-18 17:43 UTC (permalink / raw)
To: 9fans
not really. in some cases a server I
have wants to close the con to a
client and there's a reader proc.
I would like to hang up even if the
client doesn't.
On Feb 18, 2013, at 5:54 PM, lucio@proxima.alt.za wrote:
>> What do you do in that case? Or, more likely, what am I doing wrong?
>
> You're trying to signal in-band, which is only a short cut. Would it
> be expensive to put the signalling out of band?
>
> ++L
>
>
> [/mail/box/nemo/msgs/201302/889]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] two questions about go in Plan 9
@ 2013-02-18 15:21 Francisco J Ballesteros
2013-02-18 16:51 ` lucio
0 siblings, 1 reply; 11+ messages in thread
From: Francisco J Ballesteros @ 2013-02-18 15:21 UTC (permalink / raw)
To: 9fans
Forgive me,
Somehow I removed the -v from the call to go test. That makes the log print only for failed tests.
Regarding TCP, forsyth reminded me that it's what I'd get with the std. Plan 9 system calls, which
is so.
I guess my question is… how can I interrupt a reader in that case? In C I'd be able to interrupt it.
Now, in go on Plan 9, I can't interrupt it and I can't make the stream hangup.
What do you do in that case? Or, more likely, what am I doing wrong?
thanks
On Feb 18, 2013, at 4:07 PM, nemo@lsub.org wrote:
> Hi,
>
> I've been using go for a few things in Plan 9, and noticed a couple of things.
> I'd just like to know if it's me or if this also happens to others:
>
> - diagnostics issued by log.Print et al. don't show up unless I call log.Fail
> - closing a tcp connection which is still open by a nearby reader proc does not report EOF to the other end
> of the connection.
>
> It might be something I made or something I didn't understand, but just in case
> these are known I thought I might ask here.
>
> thanks
>
>
> [/mail/box/nemo/msgs/201302/876]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [9fans] two questions about go in Plan 9
@ 2013-02-18 15:04 Francisco J Ballesteros
2013-02-18 15:16 ` Matthew Veety
0 siblings, 1 reply; 11+ messages in thread
From: Francisco J Ballesteros @ 2013-02-18 15:04 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Hi,
I've been using go for a few things in Plan 9, and noticed a couple of things.
I'd just like to know if it's me or if this also happens to others:
- diagnostics issued by log.Print et al. don't show up unless I call log.Fail
- closing a tcp connection which is still open by a nearby reader proc does not report EOF to the other end
of the connection.
It might be something I made or something I didn't understand, but just in case
these are known I thought I might ask here.
thanks
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-02-18 21:39 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-18 18:12 [9fans] two questions about go in Plan 9 Francisco J Ballesteros
2013-02-18 18:22 ` Matthew Veety
2013-02-18 18:56 ` Akshat Kumar
-- strict thread matches above, loose matches on Subject: below --
2013-02-18 19:04 Nemo
2013-02-18 21:39 ` Skip Tavakkolian
2013-02-18 17:43 Nemo
2013-02-18 18:05 ` cinap_lenrek
2013-02-18 15:21 Francisco J Ballesteros
2013-02-18 16:51 ` lucio
2013-02-18 15:04 Francisco J Ballesteros
2013-02-18 15:16 ` Matthew Veety
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).