Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Channel closed N N

5 views
Skip to first unread message

Michal Maruška

unread,
Apr 13, 2002, 11:57:21 AM4/13/02
to

I am getting these messages (see subject, N is digit) (on stderr i think). Am i
doing something wrong?

Michael Sperber [Mr. Preprocessor]

unread,
Apr 13, 2002, 1:49:24 PM4/13/02
to

>>>>> "Michal" == Michal Maruška <m...@maruska.dyndns.org> writes:

Michal> I am getting these messages (see subject, N is digit) (on stderr i think). Am i
Michal> doing something wrong?

It means the garbage collector has just gc'ed an I/O channel, probably
one associated with a port. When it does this, it closes the
channel. It probably means you're not explicitly closing a port even
though it's become garbage.

--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla

Rolf-Thomas Happe

unread,
Apr 14, 2002, 12:44:53 PM4/14/02
to
Michael Sperber [Mr. Preprocessor] writes:
> >>>>> "Michal" == Michal Maruška <m...@maruska.dyndns.org> writes:
> Michal> I am getting these messages (see subject, N is digit) (on stderr i think). Am i
> Michal> doing something wrong?
>
> It means the garbage collector has just gc'ed an I/O channel, probably
> one associated with a port. When it does this, it closes the
> channel. It probably means you're not explicitly closing a port even
> though it's become garbage.

Reminder - probably superfluous, but anyway: The CALL-WITH-INPUT/
/OUTPUT-FILE procedures, when applicable, do these menial jobs
(open files, close ports) for you, serving both comfort and silence.

rthappe

Michal Maruška

unread,
Apr 14, 2002, 3:53:49 PM4/14/02
to

Rolf-Thomas Happe <rth...@mathematik.uni-freiburg.de> writes:

> Reminder - probably superfluous, but anyway: The CALL-WITH-INPUT/
> /OUTPUT-FILE procedures, when applicable, do these menial jobs
> (open files, close ports) for you, serving both comfort and silence.

i know.
My construction is: (i hope this is the right one):
| (receive (port child) (run/port+proc (diff -rq ,dir ,master))

I would like silence (optional), though.

Rolf-Thomas Happe

unread,
Apr 15, 2002, 12:24:44 PM4/15/02
to
Michal =?iso-8859-2?q?Maru=B9ka?= writes:

> My construction is: (i hope this is the right one):
> | (receive (port child) (run/port+proc (diff -rq ,dir ,master))
>
> I would like silence (optional), though.

You can, if the return value of the RECEIVE block doesn't matter,
finally (CLOSE PORT), otherwise you may prefer to
(CLOSE-AFTER PORT (LAMBDA (PORT) (OPERATE-ON PORT))), like so:

(receive (port child) (run/port+proc (diff -rq ,dir ,master))

(close-after port (lambda (ip) (port->string ip))))

rthappe

0 new messages