Redirection to /dev/null block oggCat execution

0

I'm trying to use oggCat from another program, but when I call oggCat output.ogv file1.ogv file2.ogv ... filex.ogv > /dev/null the execution never ends.

Is there any solution?

Victor

Posted 2014-10-24T20:31:01.587

Reputation: 127

Answers

1

oggCat might occasionaly block for user input, for example when output file already exists it will ask if you want to overwrite. Also note that oggCat output progress information on standard error, not standard output. And your program might not be executing via shell but directly, in which case '> /dev/null' won't work. Try to run it via:

sh -c 'oggCat -x bla.ogg 1*ogg < /dev/null > /dev/null 2>&1'

which should work around all the problems above. If it still doesn't work for you, you should find a process PID in ps output, and execute:

strace -ff -tt -p PID

to find out what program is doing (replace PID with PID of oggCat process)

Matija Nalis

Posted 2014-10-24T20:31:01.587

Reputation: 2 107

It works! Thanks! As I'm calling from a java application, I use this answer: http://stackoverflow.com/questions/10791091/processbuilder-without-redirecting-stdout

– Victor – 2014-10-27T12:05:10.920