Bug 20 - LinuxSampler can be remotely shutdown
Summary: LinuxSampler can be remotely shutdown
Status: CLOSED FIXED
Alias: None
Product: LinuxSampler
Classification: Unclassified
Component: LSCP (show other bugs)
Version: SVN Trunk
Hardware: Other Linux
: P2 normal
Assignee: Christian Schoenebeck
URL:
Depends on:
Blocks:
 
Reported: 2005-05-29 18:28 CEST by Grigor Iliev
Modified: 2005-07-21 15:13 CEST (History)
0 users

See Also:


Attachments
shutdown.c example (888 bytes, text/plain)
2005-05-29 18:29 CEST, Grigor Iliev
Details
patch for lscpserver.cpp (1.19 KB, patch)
2005-07-15 23:33 CEST, Grigor Iliev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Grigor Iliev 2005-05-29 18:28:25 CEST
LinuxSampler can be remotely shutdown by provoking broken pipe error. This can 
be done by reading the returned data from LinuxSampler partially. 
I'm sending example code which works most of the time. 
I'm not sending patch because I'm not sure what will be the right decision for this 
problem. It looks like the problem rises in LSCPServer::AnswerClient method.
Comment 1 Grigor Iliev 2005-05-29 18:29:31 CEST
Created attachment 8 [details]
shutdown.c example
Comment 2 Grigor Iliev 2005-07-15 23:32:11 CEST
It looks like that LinuxSampler exits when 'Broken pipe' error is provoked
because by default send function sends SIGPIPE 'on errors on stream oriented
sockets when the other end breaks the connection'. The easiest solution will be
to use MSG_NOSIGNAL flag.
Sending patch for lscpserver.cpp
Comment 3 Grigor Iliev 2005-07-15 23:33:37 CEST
Created attachment 9 [details]
patch for lscpserver.cpp
Comment 4 Christian Schoenebeck 2005-07-19 00:29:11 CEST
Looks ok from my side. Go ahead and commit it! You have write access on the LS 
CVS module as well. Please read http://cvs.linuxsampler.org/developers.html if 
you haven't done already. That's a short readme for new developers. 
Comment 5 Grigor Iliev 2005-07-21 10:41:23 CEST
Fixed