Linux: Run a process as daemon in background from SSH

When a process supports daemon mode, you can either run it in a screen instance or init.d script.

If you had to kill off a rogue daemon and need to start it again via SSH, you can restart the daemon with a very simple addition to the command:

For example you have /bin/daemon_process with the parameters "--daemon --log-path=~/logs/blah/"

You can execute it with:

/bin/daemon_process --daemon --log-path=~/logs/blah &

The extra & at the end makes it spit output to the current terminal, but it wont wait for the daemon to finish.

Source

Android: Issues with opening files in Cyanogen Mod 7

Some people contacted me with problems trying to open files in my CodePeeker app on CM7. The OI File Manager built into the CFW is returning something unexpected, causing the app to fail in opening files.

This resulted in a few "1 star - DOES NOT WORK" ratings...

This is MADNESS! Why!?

The reasoning behind this is because OpenIntent's OI File Manager wasn't returning data according to the Android specifications.

They've written a small blurb about it and provided the backward compatible code here.

I didn't realise this but apparently I've covered a neater version of the code in a previous post.

If you ever need to test it, install the app on your emulator. The old version of OI File Manager v1.1.4 can be found on Google Code.

Testing

You can test the normal behaviour with File Expert, a great app for browsing files. Astro File Manager sucks with ads + confusing user interface. You can grab the APK for the emulator here.

srvgq
Crisis averted!

Sources

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog