View Full Version : squeezeslave backgrounding - patch

2007-05-19, 09:17
Hi all,

The most recent version of squeezeslave refuses to run in the background. I've updated squeezeslave.c so squeezeslave now recognizes the '-b' option, which tells it to run in the background and not look for stdin. I call it like this:

squeezeslave -b -m 00:00:AC:AC:AC:AC &

This should help anyone trying to call squeezeslave from a startup script or run squeezeslave in the background.

Attached is the updated squeezeslave.c (with .txt appended, since .c files cannot be attached), along with a patch file.

I have also made a small change which was necessary for squeezeslave to run under Ubuntu for PPC. This change is also included, but the code should work regardless of platform.

Hope this helps folks.

-Dr. C.

2007-05-19, 11:43
great stuff. There is a bug report for this issue, so it would be
great if you could attach the patch to that report so it won't get



2007-05-19, 14:10
Good idea. Done.

-Dr C

2007-05-21, 05:17
Great - thanks for doing this!

It runs fine for me, both on my desktop machine (Ubuntu) and directly on my server (Clarkconnect). I'm using SlimServer 6.3.1.

One question - does squeezeslave (in any form!) work for anyone running 6.5.x?


2007-05-21, 10:40
It does not work for me, I had filed a bug for that as well when I filed the
background one:


Thanks for the first fix!


On 5/21/07, ianc <ianc.2qxnbb1179750001 (AT) no-mx (DOT) forums.slimdevices.com> wrote:
> Great - thanks for doing this!
> It runs fine for me, both on my desktop machine (Ubuntu) and directly
> on my server (Clarkconnect). I'm using SlimServer 6.3.1.
> One question - does squeezeslave (in any form!) work for anyone running
> 6.5.x?
> -ian
> --
> ianc
> ------------------------------------------------------------------------
> ianc's Profile: http://forums.slimdevices.com/member.php?userid=3481
> View this thread: http://forums.slimdevices.com/showthread.php?t=35403

2007-05-23, 15:12
Slimserver 6.5.1 is installed on Ubuntu edgy LAMP server and the OSX is a brand new minimal install using only the first CD out of four in the full panther box with only US localization. The library is served up via NFS mount from a FreeNAS which also has Michael Herger's SlimNAS installed on it. I haven't tried to connect to that SlimNAS yet, though.

I had squeezeslave 0.6 running great for a little while on a little white g3 ibook 600 dual usb after some bad starts but now it won't play anymore. It was great while it lasted using very little cpu @ about 5-10% through several songs. I left and came back and it had lost the connection...then no more. It was an immense improvement over Softsqueeze as far as cpu usage. Softsqueeze quickly gobbles up any spare cpu cycles around the end of the first song and stays there until it finally freezes the whole machine. I'm wondering if trying to run Squeezeslave from my Ubuntu workstation at the same time fully screwed the whole thing up. I only did that after the Sslave wouldn't run on the iBook anymore.

Eureka! I finally figured out how to get Softsqueeze to run headless. I found this to be the only way to run the latest versions on XP AND even Ubuntu since the full UI just doesn't work for me. For anyone else trying this the command that worked for me is:

java -Dserver=<server ip> -Dskins=headless -jar /Applications/Softsqueeze.app/Contents/Resources/app/SoftSqueeze.jar

But, alas, the cpu jumped back up to pegged at the end of the first song again. It did seem to last longer this time headless using less memory at least, though. And I could actually do some other things on the iBook while SS was running. Screenshoot attached.

Java 1.4.2_12 is surely not ideal and isn't really even supported from what I see. But Softsqueeze 3.4 does work well while it works. I have a crazy mix of just about every type of encoded file there is but mostly mp3, flac, ogg, wav and even a few ape and mpc's. I can't play mpc yet since I haven't put the codec in the server.

I'm not quite sure what to do with the patch. It would be a great way to waste some more time trying to fix this for Panther so I don't really expect much to come of this. Although it might give some clues and help others who may be in the same boat. I'll probably abandon OSX and try Xubuntu PPC(again), Fluxbuntu (when it comes out) or Yellow Dog. Panther is excruciatingly slow on this thing so I'm surely not going to waste any more time or money with Tiger or Leopard. I'm saving up for an iPhone (not). Leopard will be almost obsolete by the time I post this anyway. At least Apple is helping keep the landfill operators busy.

I'm trying to recycle some of these iBooks to use in unfriendly environs and as demos for the Slimservers I'm giving out to friends hoping they'll see how great it is and spring for a Squeezebox or even Transporter.

I'm loving the whacked out mixes from Slims random mix.


2007-05-24, 08:56
Ian, Chris –

I’m running 6.5.1-1, and need to restart squeezeslave far too often. With repeated ‘starts,’ ‘stops,’ process kills and restarts, I can get it playing – but eventually (minutes to hours) slimserver tells me the player is not found, while squeezeslave just sits there, apparently running. I see the same squeezeslave debug output that Chris posted in the bug report (glad you did that!).

Anyone have any idea where this bug originates (i.e., is this in squeezeslave or in the later slimservers)? I’m almost curious enough to go digging, but don’t quite know where to look.

-Dr. C.

2007-05-27, 04:15

The symptoms you're seeing with 6.5.1-1 are the same ones I get with all the 6.5.x versions I've tried - hence I reverted to 6.3.1.

My first guess would be that the problem is somewhere in slimproto - but as my limited experience of C programming ended more than 15 years ago my ability at the moment to chase it down is a bit rusty!


2007-08-07, 12:49
Hi all,

I'm new here (just bought a squeezebox and I'm working on the server setup), so feel free to redirect me at the right place if tihs isn't.

I have tracked down the problem in squeezeslave to be a missing keep-alive when it is paused or stopped.

If you start an instance of squeezeslave and start playback right away, then you'll be fine. Buf if you stop playback, slimserver will discard the "sleeping" squeezeslave after 15-20 seconds because squeezeslave forgets to report its status every once in a while when it's not playing.

I had no problem downloading the code, inspecting it and adding the status report, and it fixed the problem for me (slimserver 6.5.3, running on Xubuntu 7.04). But where I'd need help, though is how to submit these changes. Can anybody provide steps to follow to contribute this fix? Or point to a place so I can read it for myself?

BTW, I am also experiencing the problem where squeezeslave does not work as a daemon. I have seen a patch to this problem, but the proposed solution causes squeezeslave to just sleep indefinitely. Shouldn't proper daemonization be made with signals, so we can tell the process to cleanly shutdown rather than just killing it? Just a thought...


Mark Lanctot
2007-08-07, 12:55
You should probably ask this in the Developers forum:


But IIRC squeezeslave has been abandoned.

2007-08-07, 13:26
Indeed, the last update is a bit more than a year old. Too bad: I just love the lightness of squeezeslave compared to softsqueeze, dependencies are a lot smaller.

I'll try to figure out if it's worth augmenting/fixing. Not sure who to ask, though.


Mark Lanctot
2007-08-07, 13:38
Richard Titmuss was the developer. He's now working for Logitech. He also developed SoftSqueeze and squeezeslave was a lighter non-Java implementation.

2007-08-08, 00:25
Richard Titmuss was the developer. He's now working for Logitech. He also developed SoftSqueeze and squeezeslave was a lighter non-Java implementation.

Well I for one use Squeezeslave all the time, it puts a much lighter load on my CPU than softsqueeze.

I have the same problem with squeezeslave dying if not used, but to be honest it is not a show stopper for me, I simply kill it and restart it if needed.