From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From:  <pm@debian.org>
Date: Sep, 30 2026 15:16:32 +0100
Subject: [PATCH] <short summary of the patch>

TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.

---
The information above should follow the Patch Tagging Guidelines,
see https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-<Vendor>: <vendor-bugtracker-url>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>

--- cwidget-0.5.18.orig/src/cwidget/toplevel.cc
+++ cwidget-0.5.18/src/cwidget/toplevel.cc
@@ -487,7 +487,7 @@ namespace cwidget
 
 	    if(result != 1)
 	      {
-		if(errno != EINTR && errno != 0)
+		if(result == -1 && errno != EINTR && errno != 0)
 		  {
 		    // Probably means that there was an error reading
 		    // standard input.  (could also be ENOMEM)
