*BSD News Article 55875


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!news.kei.com!newsfeed.internetmci.com!EU.net!peer-news.britain.eu.net!newsfeed.ed.ac.uk!edcogsci!richard
From: richard@cogsci.ed.ac.uk (Richard Tobin)
Subject: Re: Odd way of passing parameters
Message-ID: <DIx6oG.69q@cogsci.ed.ac.uk>
Organization: HCRC, University of Edinburgh
References: <817632346snz@beckley.demon.co.uk>
Date: Fri, 1 Dec 1995 18:14:40 GMT
Lines: 15

In article <817632346snz@beckley.demon.co.uk> iwta@beckley.demon.co.uk writes:
>Code creates a pipe, the parent writes block to the pipe
>(approx 132 bytes), it then overwrites itself with execv()
>and then the new process reads its 'parameters' from the pipe.

It's certainly unusual, but I don't see why it shouldn't be legal -
the only question would be whether the pipe fills up, and 132 bytes
won't do that (though whether anything *guarantees* it I don't know).

-- Richard

-- 
"Hither turn thy steps, hither come to thy death and for Camilla
receive due guerdon!  Shalt thou, even thou, die by Diana's darts?"
                                              [Virgil, Aeneid X1 855-7]