[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strange mkstemp! behavior
From: |
Maarten Grachten |
Subject: |
Re: strange mkstemp! behavior |
Date: |
Mon, 13 Sep 2004 11:21:33 +0200 (CEST) |
Thanks RM!
On Mon, 13 Sep 2004 address@hidden wrote:
> On Mon, Sep 13, 2004 at 10:24:27AM +0200, Maarten Grachten wrote:
> > Hi guile people,
> >
> > in 1.6.4, but also in 1.7.1 (didn't try others) there seems to be
> > something wrong when using mkstemp! several times after another like this:
> >
> > (define (look-at-this x)
> > (let ((name "/tmp/XXXXXX"))
> > (write-line name)
> > (mkstemp! name)))
>
> I'm not a schemer, but doesn't the above code violate the specs?
> '(let ((name "/tmp/XXXXXX"))' binds 'name' to an inmutable string
> (string constants are inmutable).
>
> How about:
>
> (define (look-at-this x)
> (let ((name (string-copy "/tmp/XXXXXX")))
> (write-line name)
> (mkstemp! name)))
>
> On my system this produces:
>
> guile> (version )
> "1.6.4"
> guile> (map look-at-this '(1 2 3))
> /tmp/XXXXXX
> /tmp/XXXXXX
> /tmp/XXXXXX
> (#<input-output: /tmp/YoV3f2 3> #<input-output: /tmp/g5Etjk 4>
> #<input-output: /tmp/uX15kC 5>)
> guile>
>
>
> HTH Ralf Mattes
>
______________________________________________________________________________
Maarten Grachten
Institut d'Investigacio en Intel.ligencia Artificial, IIIA
Spanish Scientific Research Council, CSIC
Campus UAB
08193 Bellaterra, Catalunya, Spain
Ph.: +34 93 5809570 Fax.: +34 93 5809661
address@hidden
______________________________________________________________________________
Why limit the freedom of software development? Say `no' to software patents!
http://swpat.ffii.org
- strange mkstemp! behavior, Maarten Grachten, 2004/09/13
- Re: strange mkstemp! behavior, rm, 2004/09/13
- Re: strange mkstemp! behavior,
Maarten Grachten <=
- Re: strange mkstemp! behavior, Stephen Compall, 2004/09/13
- Re: strange mkstemp! behavior, Paul Jarc, 2004/09/22
- Re: strange mkstemp! behavior, Kevin Ryde, 2004/09/25
- Re: strange mkstemp! behavior, Marius Vollmer, 2004/09/28
- Re: strange mkstemp! behavior, Marius Vollmer, 2004/09/29