Mail Archives: djgpp-workers/2004/12/06/10:37:41
On Sat, 4 Dec 2004, DJ Delorie wrote:
> > the ptrs in the struct are not NULLed after allocation;
>
> Ok, *that* is the bug we should fix.
I agree, that is the way the issue should be fixed, so I propose
my first patch again.
No matter how this is fixed, the important issue is to notice that the
actual popen()/pclose() implementation is still broken and that other
packages like txi46[bds].zip, txi47[bds].zip, sed412[bds].zip, etc that
use this functionality are indeed broken too.
IMHO all these packages must be fixed either using a new djdev204 release
or including a fixed popen.c file that will be compiled with the package
sources and will replace the popen/pclose files that come with actual
djdev204.
Regards,
Juan M. Guerrero
diff -arNU5 djgpp.orig/src/libc/posix/stdio/popen.c djgpp/src/libc/posix/stdio/popen.c
--- djgpp.orig/src/libc/posix/stdio/popen.c 2004-11-30 05:08:20.000000000 +0000
+++ djgpp/src/libc/posix/stdio/popen.c 2004-12-04 18:24:54.000000000 +0000
@@ -76,10 +76,11 @@
char *temp_name;
/* make new node */
if ((l1 = malloc(sizeof(*l1))) == NULL)
return NULL;
+ l1->command = NULL;
/* if empty list - just grab new node */
l1->next = pl;
pl = l1;
- Raw text -