[Voyage-linux] udev & hotplug
Gustin Johnson
(spam-protected)
Wed Jan 25 04:38:59 HKT 2012
Simply put, I don't always have access to killall (I use other
hardware and softwaresuch as OpenWRT and some really constrained ARM
and MIPS boards). psmisc is almost 1 MiB in size. This has not been
a problem in the last few years but the code works, so I have not
changed it :)
killall -r would also work in cases where you need to be more
selective (python apps, java apps, etc.).
pidof I simply did not know about.
On Tue, Jan 24, 2012 at 11:38 AM, Teco Boot <teco at inf-net.nl> wrote:
> Why not killall fswebcam
> (psmisc is in 0.8.0)
>
> Or kill `pidof fswebcam`
>
> Teco
>
> Op 24 jan. 2012, om 18:41 heeft Gustin Johnson het volgende geschreven:
>
>> Forgot to mention, when assigning that bash 1 liner, enclose the code
>> between two `
>>
>>
>> On Tue, Jan 24, 2012 at 10:40 AM, Gustin Johnson <gustin at meganerd.ca> wrote:
>>> For the second part you could create a variable called fswPID (the
>>> name is arbitrary) but give it a value like this:
>>> ps x |grep fswebcam |grep -v grep |cut -f 1 -d " "
>>>
>>> This will return the PID of the fswebcam process.
>>>
>>> Then just do:
>>>
>>> kill -1 $fswPID
>>>
>>> Hth,
>>>
>>> 2012/1/24 maciek <maciek2 at protetyka.lodz.pl>:
>>>> Hello
>>>>
>>>> I`d like to set my usb webcam as hotplug device. When I plugin I`d like to
>>>> start fswebcam deamon and unplug - stop.
>>>>
>>>> I set it like this:
>>>>
>>>> SUBSYSTEM=="video4linux", ATTR{name}=="UVC Camera (046d:080f)",
>>>> NAME="logitech", GROUP="video", MODE="0660", GOTO="fswebcam_start"
>>>>
>>>> GOTO="fswebcam_end"
>>>>
>>>> LABEL="fswebcam_start"
>>>>
>>>> ACTION=="add", RUN+="fswebcam -c /root/fswebcam.conf
>>>> --pid=/var/run/fspid"
>>>>
>>>> ACTION=="remove" RUN+="???????????"
>>>>
>>>> GOTO="fswebcam_end"
>>>>
>>>>
>>>> Questions:
>>>>
>>>> 1. Are those script ok? (action add & remove)
>>>> 2. How to kill process fspid (ACTION=="remove")?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> v o i p t e l e . n e t , dzwon najtaniej jak to mozliwe
>>>> e r a u r . c o m , rozwiazania internetowe dla firm i klientow indywidualnych
>>>>
>>>> _______________________________________________
>>>> Voyage-linux mailing list
>>>> Voyage-linux at list.voyage.hk
>>>> http://list.voyage.hk/mailman/listinfo/voyage-linux
>>
>> _______________________________________________
>> Voyage-linux mailing list
>> Voyage-linux at list.voyage.hk
>> http://list.voyage.hk/mailman/listinfo/voyage-linux
>
More information about the Voyage-linux
mailing list