Bug 20

Summary: LinuxSampler can be remotely shutdown
Product: LinuxSampler Reporter: Grigor Iliev <gr.iliev>
Component: LSCPAssignee: Christian Schoenebeck <cuse>
Status: CLOSED FIXED    
Severity: normal    
Priority: P2    
Version: SVN Trunk   
Hardware: Other   
OS: Linux   
Attachments: shutdown.c example
patch for lscpserver.cpp

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