Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!ccut!lkbreth!octavia!serow From: serow@octavia.ibix.co.jp (Yoshitomo Tanaka) Newsgroups: comp.lang.perl Subject: msdos/popen Message-ID: Date: 18 Feb 91 05:41:26 GMT Sender: news@octavia.ibix.co.jp Distribution: comp Organization: IBIX Co., Ltd. Tokyo, Japan Lines: 37 In msdos version of perl(v3 pl44 compiled with MS-C6.00 on MSDOS3.2) open(OUTPUT, "|cmd"); does not work correctly, for the reason that execute cmd before closeing tmp file 'pp' I think.. I did following modification and works fine. *** msdos/popen.c.old Fri Feb 1 17:35:14 1991 --- msdos/popen.c Mon Feb 18 13:33:00 1991 *************** *** 145,154 **** case execute: (void)sprintf(buff, "%s <%s", p->command, p->name); free(p); ! if (system(buff)) { (void)unlink(name); status = EOF; ! } else if (fclose(f) == EOF) { (void)unlink(name); status = EOF; } else if (unlink(name) < 0) --- 145,154 ---- case execute: (void)sprintf(buff, "%s <%s", p->command, p->name); free(p); ! if (fclose(f) == EOF) { (void)unlink(name); status = EOF; ! } else if (system(buff)) { (void)unlink(name); status = EOF; } else if (unlink(name) < 0) -------------------- -+--+- Yoshitomo Tanaka | ' serow@ibix.co.jp \---