On Tuesday 07 August 2007 13:00, Alexander Griesser wrote:
> This one seems to be a duplicate of a previous bug report for bb
> 1.3.1/1.4.1, here's the link:
>
> http://www.busybox.net/lists/busybox/2007-February/026289.html
>
> Currently (latest svn version), I'm unable to upload files onto my
> busybox installation running busybox httpd.
>
> The problem is, that the `cat` command never finishes after it wrote
> the uploaded file successfully to the temporary location, that means
> uploading works, but after the upload has finished, `cat` doesn't quit.

Yes, it's a bug. Fix:

                xmove_fd(toCgi[0], 0);  /* replace stdin with the pipe */
                xmove_fd(fromCgi[1], 1);  /* replace stdout with the pipe */
                close(fromCgi[0]);
-               close(fromCgi[1]);
+               close(toCgi[1]);

We were leaving toCgi[1] open, and when parent was closing it,
we still had another copy of open file descriptor. read()
inside cat does not return "0 bytes read (EOF)", but blocks,
waiting for more data.

Can you confirm that this fix works for you?
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to