Thanks. I've pushed it with all your suggestions included, except that I have not bothered to replace select with poll. Personally I find select easier to understand, although it is a little more verbose.
J' On Mon, Apr 15, 2013 at 10:07:34PM -0700, Ben Pfaff wrote: 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. -- PGP Public key ID: 1024D/2DE827B3 fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://keys.gnupg.net or any PGP keyserver for public key.
signature.asc
Description: Digital signature
_______________________________________________ pspp-dev mailing list pspp-dev@gnu.org https://lists.gnu.org/mailman/listinfo/pspp-dev