From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jul 10 18:18:14 2014 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBC44871 for ; Thu, 10 Jul 2014 18:18:14 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8653E257A for ; Thu, 10 Jul 2014 18:18:14 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6AIIEM3036370 for ; Thu, 10 Jul 2014 18:18:14 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 191781] [patch] multimedia/webcamd - much improved rc.d script Date: Thu, 10 Jul 2014 18:18:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dreamcat4@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2014 18:18:14 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191781 --- Comment #9 from dreamcat4@gmail.com --- (In reply to Hans Petter Selasky from comment #8) > Hi, > > That sounds like a good idea. Maybe you can do the "usbconfig" only once, > and then pass it through a regular expression like "grep -iE -- xxx". You Yes. > should accept multiple matches. This makes a dependency for usbconfig, but I Probably OK because usbconfig is included in FreeBSD base. > think that is OK. Possibly this functionality could be integrated into > webcamd aswell, which might be more clean? Yes indeed. In fact all these function would be better inside webcamd (forking / spawning) as C code is faster and give better performance. I can make very easy in the rc.d script right now, which take just 1-2 days. Which can be done right away. Then later on, when you eventually can work on the C daemon, it can replace any stuff in rc.d script with C mechanism of daemon. But first it may help to decide beforehand possible interface for C daemon, when starting up multiple instances. For example if webcamd rc.d script wants to start on 2 identical device then we make some fixed delay of n seconds (normally 0,1, or 2 seconds) to avoid possible conflict of /dev/dvb node names being grabbed. Yet if the webcamd 'C' daemon had some good lock mechanism communicate with it's sister processes. It could reserve node names ahead of initialization, then 2 instances can be started simultaneously without such delay. And the 2nd instance can see the reserved /dev/ node names, and avoid them. This is important if the time taken to initialise the USB hardware device is not constant. It could be less than 1 second, or several seconds. > > What do you think? > > --HPS -- You are receiving this mail because: You are the assignee for the bug.