Bug 4734 - Squeezeslave will not run as a background process correctly.
: Squeezeslave will not run as a background process correctly.
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Softsqueeze
: 6.5.1
: PC Linux (other)
: P2 normal (vote)
: ---
Assigned To: Richard Titmuss
https://sourceforge.net/forum/message...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-04 17:11 UTC by Chris LaPlante
Modified: 2007-12-10 09:33 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
Patch to SVN version of squeezeslave.c. Adds '-b' option to tell process it is going into the background. (1.65 KB, patch)
2007-05-19 14:02 UTC, Dr. C.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris LaPlante 2007-02-04 17:11:44 UTC
squeezeslave will not run as a daemon process. Ideally I would think it should either fork by default, (and perhaps give an optional flag to have it stay in the foreground) or have a flag to tell it to daemonize.

# /usr/local/bin/squeezeslave 10.0.0.61 -m 02:00:00:00:00:00 -d slimproto -d slimaudio &
[1] 2355
root@0[rc3.d]# proto state=1
Output devices:
0: /dev/dsp
slimproto_connect(10.0.0.61, 3483)
proto state=2
Connected to 10.0.0.61
proto state=3
slimproto_send: cmd=HELO len=10

(enter key pressed)


[1]+  Stopped                 /usr/local/bin/squeezeslave 10.0.0.61 -m 02:00:00:00:00:00 -d slimproto -d slimaudio

#
Comment 1 Dr. C. 2007-05-19 14:02:30 UTC
Created attachment 2023 [details]
Patch to SVN version of squeezeslave.c.  Adds '-b' option to tell process it is going into the background.

Not widely tested.  Works for me.

Patch to SVN version of squeezeslave.c.  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 192.168.1.32 &


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.

Discussion in forums at http://forums.slimdevices.com/showthread.php?t=35403 . 

-Dr. C.
Comment 2 Chris Owens 2007-05-21 10:04:20 UTC
Richard, should I target this for 7?
Comment 3 Chris Owens 2007-12-10 09:33:11 UTC
Alan Young thinks this has been fixed by some change of Dominic's