Перенаправление на / dev / null блок выполнения oggCat

223
Victor

Я пытаюсь использовать oggCat из другой программы, но при вызове oggCat output.ogv file1.ogv file2.ogv ... filex.ogv > /dev/nullвыполнение никогда не заканчивается.

Есть ли решение?

0

1 ответ на вопрос

1
Matija Nalis

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)

Оно работает! Спасибо! Поскольку я звоню из Java-приложения, я использую этот ответ: http://stackoverflow.com/questions/10791091/processbuilder-without-redirecting-stdout Victor 9 лет назад 0

Похожие вопросы