[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Drunk driving



Mark-Jason Dominus writes:
|> Randal L. Schwartz writes:
|> |>>>>> "L" == L  <Brian> writes:
|> |L> Actually writing formatted text to a variable. And to be somewhat fair,
|> |L> that's about the only way to do it in base perl4.
|> |Well, not without forking. :)
|> I thought of that, but consider it basically the same as the example given:
|> whether the intermediary is a pipe or a temp file, write to some filehandle,
|> then read the formatted text. With the temp file you need to clean up the
|> file while pipes go away on their own, but forking doesn't work with perls
|> that don't fork.
|Aha!  This is a *perfect* opportunity to use `the secret passage'.

Ah, I should have thought of that, being I used it in some C code ~13-14
years ago for exactly what Mark-Jason suggests--passing secret data around
without having it appear on the command line or in a file. I still remember
the looks of horror I got when I explained it, but I thought it was quite
clever!

One thing to watch out for, pipes do have finite sizes, and if you write
too much you'll block, waiting for the process on the other end of the pipe
to read some data. In this case, well, that would be bad. :-)

Brian

==== Want to unsubscribe from this list? (Don't you love us anymore?)
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org