[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for review
From: |
Ben Pfaff |
Subject: |
Re: Patch for review |
Date: |
Mon, 15 Apr 2013 22:07:34 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Apr 14, 2013 at 05:37:19PM +0200, John Darrington wrote:
> This patch should be self-explanitory, but profound enough to warrant
> a review.
This looks good to me. I have some nits to pick:
According to Google, "interruptible" is the correct spelling (not
-able).
The code would be a little shorter and easier to read with "poll" in
place of "select".
It's usually advised to set both ends of the pipe into nonblocking mode
for a use like this, so that in a corner case where signals arrive
faster than they can be processed, filling up the pipe buffer in the
signal handler does not cause the "write" from the signal handler to
block. (This is unlikely to happen, but it causes a mysterious hang if
it does.)
In bash, if I type control+C, then I get a new prompt on a new line. In
PSPP, with this patch, I get a new prompt on the same line. The shell
behavior seems better to me; it is more familiar, at any rate.
"memcpy (buf, "\n", 1);" seems like a long way to write "*buf = '\n';"
Thanks,
Ben.
- Patch for review, John Darrington, 2013/04/14
- Re: Patch for review,
Ben Pfaff <=