summaryrefslogtreecommitdiff
path: root/gtk2_ardour/system_exec.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-06-07 11:59:47 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-06-07 11:59:47 -0400
commit323f39d8b6d093741b612244935684bfc53a0360 (patch)
treebac21200e3f4ee592db5b5a517120d78a532f104 /gtk2_ardour/system_exec.cc
parent8d6dd9ecc0a4b9ea11d5273c62ed134962b5b224 (diff)
fix ssize_t/size_t confusion
Diffstat (limited to 'gtk2_ardour/system_exec.cc')
-rw-r--r--gtk2_ardour/system_exec.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/system_exec.cc b/gtk2_ardour/system_exec.cc
index 566c87dfbb..29e8cb913e 100644
--- a/gtk2_ardour/system_exec.cc
+++ b/gtk2_ardour/system_exec.cc
@@ -415,6 +415,7 @@ SystemExec::terminate ()
{
::pthread_mutex_lock(&write_lock);
close_stdin();
+
if (pid) {
::usleep(50000);
sched_yield();
@@ -643,7 +644,8 @@ int
SystemExec::write_to_stdin(std::string d, size_t len)
{
const char *data;
- size_t r,c;
+ ssize_t r;
+ size_t c;
::pthread_mutex_lock(&write_lock);
data=d.c_str();
@@ -658,7 +660,7 @@ SystemExec::write_to_stdin(std::string d, size_t len)
sleep(1);
continue;
}
- if (r != (len-c)) {
+ if ((size_t) r != (len-c)) {
::pthread_mutex_unlock(&write_lock);
return c;
}