Xref: utzoo comp.lang.perl:2240 comp.sys.ibm.pc.misc:1262 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!motcsd!dms!morris From: morris@dms.UUCP (Jim Morris) Newsgroups: comp.lang.perl,comp.sys.ibm.pc.misc Subject: Patch to fix MSDOS PERL popen for write. Keywords: MSDOS PERL patch fix popen Message-ID: <1146@dms.UUCP> Date: 29 Aug 90 20:21:25 GMT Organization: Atari Games Inc., Milpitas, CA Lines: 31 There is a bug in the version of popen.c that came with the MSDOS version of perl. It affects the open(WP, "|command"). The patch at the end of this file fixes the problem (For me anyway!!). Now all we need is a version of popen that swaps the parent image to disk or EMM first before doing the system call!! Any takers. Jim =============== Cut here ================================================== *** /src/utils/perl/msdos/BD/popen.c Thu Mar 29 10:25:15 1990 --- /src/utils/perl/msdos/popen.c Wed Aug 29 13:18:35 1990 *************** *** 141,146 **** --- 141,148 ---- return status; case execute: (void)sprintf(buff, "%s <%s", p->command, p->name); + fclose(p->f); /* jegm fix for write pipes + must close file before using it */ free(p); if (system(buff)) { (void)unlink(name); =============== End cut ==================================================== -- Jim Morris. {motcsd|weitek}!dms!morris or morris@dms.UUCP Voice (408) 434-3798 Atari Games Corporation, 675 Sycamore Drive, Milpitas CA 95035 USA (Arcade Video Game Manufacturer, NOT Atari Corp. ST manufacturer).