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.

_______________________________________________
pspp-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to