Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: From: "Town, Brad" To: "'cygwin AT sources DOT redhat DOT com'" Subject: RE: Make --win32 shell bug? Date: Fri, 20 Oct 2000 14:59:03 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C03AC7.D014C960" ------_=_NextPart_000_01C03AC7.D014C960 Content-Type: text/plain Attached: . new patch to make's function.c. It always null-terminates the buffer instead of only when it's empty, which is what I should have done in the first place. Sorry. . patch to ChangeLog.Cygnus with new entry. (The entry assumes the new patch to function.c.) I saw the corrected spawn in this morning's CVS sources. I was mad because your solution was much better. :) Brad Town > I've applied your make patches to the sources. If you could > send along > appropriate ChangeLog entries it would be appreciated. > > I've chosen to correct Cygwin's behavior by using the program argument > that was passed to spawn_guts rather than looking for > command.com in the > path. It was actually a bug that this wasn't done already. > > Thanks for investigating this. If you could send me the > ChangeLog, I'll > look into releasing a new version of make over the weekend. > > FYI, please follow *exactly* the format used in the current > ChangeLog with > regard to spacing, formatting, and filename/function usage. > > cgf > > On Thu, Oct 19, 2000 at 02:27:09PM -0400, Town, Brad wrote: > >Attached is a patch to winsup/cygwin/spawn.cc -- it's the > final piece of the > >puzzle. It and the patches I sent yesterday fix the make > --win32/cmd.exe > >problem. > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > ------_=_NextPart_000_01C03AC7.D014C960 Content-Type: application/octet-stream; name="ChangeLog.Cygnus.diff" Content-Disposition: attachment; filename="ChangeLog.Cygnus.diff" --- ChangeLog.Cygnus Sat Sep 9 22:14:42 2000 +++ ChangeLog.Cygnus.townba Fri Oct 20 14:42:54 2000 @@ -1,3 +1,10 @@ +Fri Oct 20 14:08:08 2000 Brad Town + + * function.c (func_shell): Null-terminate buffer after reading from + pipe to avoid problem with fputs. + * job.c (construct_command_argv): Check "rest of line" pointer to be + non-null before pointing it back into input line in --win32 mode. + Sat Sep 9 22:13:25 2000 Kevin Lilly * read.c (readline): Move \r test after len has been potentially reset ------_=_NextPart_000_01C03AC7.D014C960 Content-Type: application/octet-stream; name="function.c.diff2" Content-Disposition: attachment; filename="function.c.diff2" --- function.c.try1 Fri Oct 20 14:25:46 2000 +++ function.c Fri Oct 20 14:27:33 2000 @@ -1433,7 +1433,6 @@ maxlen = 200; buffer = (char *) xmalloc (maxlen + 1); - buffer[0] = 0; /* Read from the pipe until it gets EOF. */ i = 0; @@ -1451,6 +1450,7 @@ i += cc; } while (cc > 0 || EINTR_SET); + buffer[i] = 0; /* Close the read side of the pipe. */ #ifdef __MSDOS__ ------_=_NextPart_000_01C03AC7.D014C960 Content-Type: text/plain; charset=us-ascii -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com ------_=_NextPart_000_01C03AC7.D014C960--