[Discuss-gnuradio] Using Popen to start a pipe and pass the input
Hello All, I am trying to use popen to open an application under a block. This looks something like that: fp = popen(command, w); //doing it in write mode if(!fp){ #Handle the error } .. pclose(fp); Now the thing is even if I am trying to track using (fp != NULL) it still keep executing the command over and over. Any ideas on that? May somebody can guide me through right way to use popen? Also to pass the c++ output stream, std::cout will work, right? Thanks ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] Using Popen to start a pipe and pass the input
On Mon, Jul 29, 2013 at 4:02 AM, Shashank Gaur shashankg...@ieee.org wrote: Hello All, I am trying to use popen to open an application under a block. This looks something like that: fp = popen(command, w); //doing it in write mode if(!fp){ #Handle the error } .. pclose(fp); Now the thing is even if I am trying to track using (fp != NULL) it still keep executing the command over and over. Any ideas on that? May somebody can guide me through right way to use popen? Also to pass the c++ output stream, std::cout will work, right? Thanks Hi Shashank, I know you are working on GNU Radio for the GSoC, but this question isn't related to GNU Radio. You'll be better off asking another forum like Stack Overflow. Tom ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] Using Popen to start a pipe and pass the input
Apologies, I asked on Stack Overflow but posted here as well. Thanks On Mon, Jul 29, 2013 at 5:08 PM, Tom Rondeau t...@trondeau.com wrote: On Mon, Jul 29, 2013 at 4:02 AM, Shashank Gaur shashankg...@ieee.org wrote: Hello All, I am trying to use popen to open an application under a block. This looks something like that: fp = popen(command, w); //doing it in write mode if(!fp){ #Handle the error } .. pclose(fp); Now the thing is even if I am trying to track using (fp != NULL) it still keep executing the command over and over. Any ideas on that? May somebody can guide me through right way to use popen? Also to pass the c++ output stream, std::cout will work, right? Thanks Hi Shashank, I know you are working on GNU Radio for the GSoC, but this question isn't related to GNU Radio. You'll be better off asking another forum like Stack Overflow. Tom ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio