<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -264,9 +264,12 @@ syscalls::time(time_t *t) {
 
 int
 syscalls::usleep(useconds_t usec) {
+	// We use syscalls::nanosleep() here to reuse the code that sleeps
+	// for the remaining amount of time, if a signal was received but
+	// system call interruption is disabled.
 	struct timespec spec;
 	spec.tv_sec = usec / 1000000;
-	spec.tv_nsec = usec % 1000000;
+	spec.tv_nsec = usec % 1000000 * 1000;
 	return syscalls::nanosleep(&amp;spec, NULL);
 }
 </diff>
      <filename>ext/oxt/system_calls.cpp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>44b3efbab8b51069ec18af70d2ab59b660a5d38e</id>
    </parent>
  </parents>
  <author>
    <name>Hongli Lai (Phusion)</name>
    <email>hongli@phusion.nl</email>
  </author>
  <url>http://github.com/FooBarWidget/passenger/commit/90a77a946051c185fc6e1b177fb27b5a14959d63</url>
  <id>90a77a946051c185fc6e1b177fb27b5a14959d63</id>
  <committed-date>2009-07-01T04:20:16-07:00</committed-date>
  <authored-date>2009-06-30T11:30:06-07:00</authored-date>
  <message>Fix oxt::syscalls::usleep(): it doesn't sleep for the correct number of milliseconds.</message>
  <tree>58a4f095b4c4fab6ec2c17761363b29c3e8f836d</tree>
  <committer>
    <name>Hongli Lai (Phusion)</name>
    <email>hongli@phusion.nl</email>
  </committer>
</commit>
