[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LD_PRELOAD=<driver> versus /etc/modules ... <module>; was "using exec in a script"



On 2011-03-10, peasthope@shaw.ca <peasthope@shaw.ca> wrote:
> From:	Liam O'Toole <liam.p.otoole@gmail.com>
> Date:	Thu, 10 Mar 2011 20:03:52 +0000 (UTC)
>> 	#!/bin/sh
>> 	export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
>> 	exec /usr/bin/skype
>
> Works perfectly.  Thanks.
>
> For sake of interest, another approach which failed was to list 
> v4l1compat in /etc/modules and invoke /usr/bin/skype in ~/.config/auto*/skype* .
>
> peter@dalton:~$ egrep -v '(^ *#)|(^ *$)' /etc/modules
> loop
> v4l1compat
>
> Why does this fail while use of LD_PRELOAD as above works?  

The problem you were facing was a userspace one, namely, how to force an
executable to load a library that would not otherwise be loaded. That's
what LD_PRELOAD achieves.

I'm not aware of a kernel module named v4l1compat, so I can't see how
explicitly loading such a module would have helped anyway.

-- 
Liam O'Toole
Cork, Ireland


Reply to: