In osicat's fd-streams.lisp, there is a function, make-fd-stream. The
sbcl version ignores the pathname parameter, but I'm not sure why. If
you set the pathname parameter in the stream, you can then recover the
pathname from the stream later on. And if you don't unlink tmp files
immediately after creation, you can do stuff like this:
(let* ((stream (open-temporary-file :no-unlink t))
(fname (namestring (pathname stream))))
(write-data-to-temp-file stream)
(close stream)
(do-shell-command-on-temp-file fname)
(nix:unlink fname))
Sure, that's not the prettiest thing you'll ever do, but it works pretty
well when you need it. If you want osicat to support that use case, I
offer a couple small patches that don't ignore pathname in
make-fd-stream on sbcl and that allow specifying (:no-unlink t) when
opening temporary files.
Thanks much.