executing a stream

Barry Margolin barmar at think.com
Thu Jan 17 17:29:34 AEST 1991


In article <141325 at pyramid.pyramid.com> moliver at shadow.pyramid.com (Mike Oliver) writes:
>Why not just create a file under /tmp (say, /tmp/executable.$$), copy
>from stdin into that file, then on feof(stdin) simply close() the file
>and exec() it.

I guess I trimmed the original article too much, as yours is the second
response I've seen that said this.  The original poster (who,
unfortunately, didn't put a "Subject" line in his message, so readers may
be having trouble finding it) mentioned this, but dismissed it as
distasteful.  Personally, I think it's better than my ptrace-based
solution, as it is really simple and completely portable; in fact, I was
sort of hoping that my description of the complexity of implementing it
without a temp file would cause him to accept the temp-file solution.
--
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.unix.internals mailing list