** Description changed: I use popen() to send data to xmgr (the old Motif plotting app), but might be reproduced with other apps listening to a pipe. The fact is that I want the xmgr display the data and the calling program run after xmgr window appears, so I used to do this trick: file = popen( "cat - | xmgr -pipe &"); ... fprintf( file, "%f %f\n", x[i], y[i] ); ... pclose( file ); When bash is /bin/sh the code above works OK. When dash is /bin/sh the "xmgr -pipe" never gets the data and the calling app closes randomly. When the "&" is not used, bash and dash work (but the app does not go on until the xmgr is closed, so this is not the way I want it to work) Is this a dash bug or a bash feature? I cannot see if it is or not from - what it says at popen manual page. I'm not a Unix guru neither. + what it says at popen manual page. I'm not a Unix guru either. I've work-around this with "sudo dpkg-reconfigure dash" so I can use bash as /bin/sh instead of dash and recover the old behaviour
-- popen() C call behaviour changes from bash to dash https://launchpad.net/bugs/69930 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs