Path: utzoo!mnetor!uunet!nbires!hao!husc6!bu-cs!madd From: madd@bu-cs.BU.EDU (Jim Frost) Newsgroups: comp.sys.ibm.pc Subject: Re: popen/pclose available for MS-DOS/MS C? Message-ID: <20248@bu-cs.BU.EDU> Date: 28 Feb 88 19:54:07 GMT References: <446@cunixc.columbia.edu> <20244@bu-cs.BU.EDU> Reply-To: madd@bu-it.bu.edu (Jim Frost) Followup-To: comp.sys.ibm.pc Organization: Boston University Distributed Systems Group Lines: 28 Addendum to my posting of simple popen/pclose routines: The function ufilen() is undefined; what it is supposed to do is return a pointer to a string containing a unique file name. I suppose a real simple one could be like this: -- cut here -- /* ufilen.c: * * returns a unique file name */ char *ufilen() { static char name[10]; static int num= 0; sprintf(name,"\\pipe%d.tmp",num++); return(name); } -- cut here -- This would at least create a unique name for each pipe created by that process. A variety of better methods exist (such as using the MS-DOS [version 3.0 or greater] function 5ah, Create Unique File [not recommended for this type of use though]), so alter as necessary. jim frost madd@bu-it.bu.edu