From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <10448d781152600dab2fec6cee720288@hamnavoe.demon.co.uk> To: 9fans@cse.psu.edu From: Richard Miller In-Reply-To: <0c17a7e1153d16dbd94d0f2a5fe7b1a0@plan9.bell-labs.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] deadlock in page(1) Date: Wed, 8 Jan 2003 11:40:28 +0000 Topicbox-Message-UUID: 3c4afeb0-eacb-11e9-9e20-41e7f4b1d025 When page calls gs to display a postscript file which uses \r as a line terminator (not \n or \r\n), deadlock ensues. Here's a correction (which may also reduce the need for the '-P' option): /sys/src/cmd/page/ps.c:429 a ps.c:430,434 > /* > * If last line terminator is \r, gs will read ahead to check for \n > * so send one to avoid deadlock. > */ > write(ps->gsfd, "\n", 1); -- Richard Miller