Description of problem: dvgrab terminates with a zero exit code (success) even when it can't actually successfully capture. If you write a script that calls on dvgrab, and you want that script to react to dvgrab failure to capture, it is important for dvgrab to terminate with an exit code which depicts whether the operation was successful or not. Not having the right exit code returned, makes it very difficult to wrap and use dvgrab within another program. How reproducible: always Steps to Reproduce: 1. Make sure a firewire video device is not actually connected to the machine! 2. Call dvgrab from within a script knowing it would fail for example: perl -e 'print system("dvgrab")' Actual results: dvgrab outputs "Error: no camera exists" but the actual exit code is zero: ----------------------------- [root@localhost ~]# perl -e 'print system("dvgrab")' Error: no camera exists 0 ---------------------------- Expected results: exit code other than zero. Additional info: the full dvgrab command I am using is: "dvgrab -noavc -nostop -format=jpeg -jpeg-quality=100 -jpeg-over -d smpte=1 image.jpg"
Adding versions: dvgrab 3.2 Linux fc11 2.6.29-0.66.rc3.fc11.i586 #1 SMP Thu Jan 29 14:43:51 EST 2009 i686 i686 i386 GNU/Linux
Issue is still present in dvgrab 3.4, but I've just slapped a quick patch in on top of it and will build dvgrab-3.4-2.fc11 shortly, which in local testing, seems to do the trick: $ dvgrab Error: no camera exists $ echo $? 1 I'll send the patch upstream as well.
Created attachment 335929 [details] Set proper retval on error condition
Build completed, can go here to find a copy. http://koji.fedoraproject.org/koji/taskinfo?taskID=1250275 Should end up in the actual rawhide tree sometime after the f11 beta freeze is over, I believe.