Thanks Alex,

I've changed the look to your #1 suggestion now:

(dm rssToPages> @
   (let Str (or (next) (exclient~call (; This rssLink) "" 5))
      (for A (rss~parseFrom
                (pipe
                   (prin Str)
                   (let Url
                      (req!> '+Url
                         'link (a; A 'htmlUrl)
                         'title (a; A 'title)
                         'site This
                         'pubAt (dtp~utcToStamp (a; A 'pubDate)) )
                      (linkUrl> '+SiteTag Url This) ) ) ) ) ) )

Should work right?




On Tue, May 30, 2017 at 10:23 AM, Alexander Burger <a...@software-lab.de>
wrote:

> Hi Henrik,
>
> > I'm running into too many file descriptors (again), or rather a file
> > descriptor leak.
> > ...
> >       (for A (rss~parseFrom (pipe (prin Str)))
>
> (pipe (prin Str))) is probably the culprit.
>
> 'pipe' has two forms of invocation:
> 1. (pipe exe . prg) executes 'prg', and cleans up everything (wait for
> child and
>    close the open file).
> 2. (pipe exe) returns a file descriptor, to be used subsequently. So you
> need to
>    remember it, and close it when done.
>
> ♪♫ Alex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to