9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Richard Miller <miller@hamnavoe.demon.co.uk>
To: 9fans@cse.psu.edu
Subject: [9fans] deadlock in page(1)
Date: Wed,  8 Jan 2003 11:40:28 +0000	[thread overview]
Message-ID: <10448d781152600dab2fec6cee720288@hamnavoe.demon.co.uk> (raw)
In-Reply-To: <0c17a7e1153d16dbd94d0f2a5fe7b1a0@plan9.bell-labs.com>

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



  reply	other threads:[~2003-01-08 11:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-07 16:27 [9fans] cdrw? dvdrw ? steve.simon
2003-01-07 16:33 ` Russ Cox
2003-01-07 16:58   ` Richard Miller
2003-01-07 17:19     ` jmk
2003-01-08 11:40       ` Richard Miller [this message]
2003-01-08 11:50 [9fans] deadlock in page(1) bwc
2003-01-08 15:00 ` Richard Miller
2003-01-08 16:47 ` Russ Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10448d781152600dab2fec6cee720288@hamnavoe.demon.co.uk \
    --to=miller@hamnavoe.demon.co.uk \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).