Skip to content

Commit fdb04c2

Browse files
committed
fixup: just check the result
1 parent 0c6ac1b commit fdb04c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ipc/interfaces.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ std::string g_ignore_ctrl_c;
3232

3333
void HandleCtrlC(int)
3434
{
35-
(void)write(STDOUT_FILENO, g_ignore_ctrl_c.data(), g_ignore_ctrl_c.size());
35+
ssize_t result = write(STDOUT_FILENO, g_ignore_ctrl_c.data(), g_ignore_ctrl_c.size());
36+
// Casting unused result to (void) does not work in gcc
37+
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
38+
if (!result) return;
3639
}
3740
#endif
3841

0 commit comments

Comments
 (0)