1 man popen You can see The return value from popen() is a normal standard I/O stream in all respects save that it must be closed with pclose() rather than fclose(3). Writing to
such a stream writes to the standard input of the command; the command's standard output is the same as that of the process that called popen(), unless this is altered by the command itself. Conversely, reading from a "popened" stream reads the command's standard output, and the command's standard input is the same as that of the process that called popen().
In other words, the return value is the STDOUT of the new process; if the new process does not print on STDOUT, of course you will not get it;
2 Execute in linutmint17 tshark -r t_fifo -T pdml echo $? is 2; indicates that the command is incorrect and the error message is redirected to STDERR;
If you get error messages in STDOUT, you can use tshark -r t_fifo -T pdml 2>&1
1 man popen
You can see
The return value from popen() is a normal standard I/O stream in all respects save that it must be closed with pclose() rather than fclose(3). Writing to
In other words, the return value is the STDOUT of the new process; if the new process does not print on STDOUT, of course you will not get it;
2 Execute in linutmint17
tshark -r t_fifo -T pdml
echo $?
is 2;
indicates that the command is incorrect and the error message is redirected to STDERR;
If you get error messages in STDOUT, you can use
tshark -r t_fifo -T pdml 2>&1