Quantcast

JSW Wrapper - found a file descriptor issue thanks to compiler. Please read.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

JSW Wrapper - found a file descriptor issue thanks to compiler. Please read.

Karthik Kumar Viswanathan
Hi,

In wrapper_unix.c we have pipedes to be an array of two descriptors.

if (dup2(pipedes[STDOUT_FILENO], STDERR_FILENO) < 0) { //Looks okay but shouldn't it be pipedes[STDERR_FILENO] ?

However, we end up closing pipedes[STDERR], which is pipedes[2] which doesn't exist.

We need to set pipedes to 3 elements for this code to work properly.

Thanks,
-Karthik

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
Wrapper-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wrapper-user
Loading...