View Single Post
Posts: 18 | Thanked: 72 times | Joined on Sep 2008
#7
Originally Posted by phedders View Post
You could:
mv /usr/bin/rtcom-call-ui /usr/bin/rtcom-call-ui.real

cat <<EOF > /usr/bin/rtcom-call-ui
#!/bin/sh
LD_PRELOAD=/usr/lib/mlocker.so
exec \${0}.real "$@"
EOF
chmod +x /usr/bin/rtcom-call-ui
That should work... hmm might try it
Short answer: no, it won't work.

Long answer: I tried that at first (actually, a slightly more complex version of that; you can see the remnants of it in mlocker.c). The problem is that those processes aren't actually standalone binaries. The file you mention is just a symlink to maemo-invoker. maemo-invoker, in turn, talks to maemo-loader (a daemon), telling it "please run the rtcom-call-ui application". maemo-loader then opens up /usr/bin/rtcom-call-ui.launch and executes it. Only here's the rub, and why all the hassle with maemo-loader in the first place: the .launch files aren't actually executables. Oh, they're binaries, to be sure, but they're more like shared libraries with a main function. maemo-loader loads them and transfers control over to them without ever calling exec().

You can do an ls -l /proc/*/exe to see just how many processes are running with maemo-loader as their system-recognized primary executable. So, whatever hacks I'm going to do, they'll have to be more complex and target maemo-loader itself. I certainly plan to, at some point; might even throw a renice() in there too. It'd sure be keen if all the processes on the critical path didn't have to wait for page faults or processor scheduling when you get a phone call.
 

The Following 3 Users Say Thank You to Cirne For This Useful Post: