source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: merge rev.
Date: Mon, 9 Jan 2017 12:57:45 -0500 (EST)	[thread overview]
Message-ID: <9367406458215565530.enqueue@fantadrom.bsd.lv> (raw)

Log Message:
-----------
merge rev. 1.279: make "cat foo.mdoc | man -l" work

Tags:
----
VERSION_1_13

Modified Files:
--------------
    mdocml:
        main.c

Revision Data
-------------
Index: main.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/main.c,v
retrieving revision 1.273.2.3
retrieving revision 1.273.2.4
diff -Lmain.c -Lmain.c -u -p -r1.273.2.3 -r1.273.2.4
--- main.c
+++ main.c
@@ -551,10 +551,10 @@ out:
 
 			/* Stop here until moved to the foreground. */
 
-			tc_pgid = tcgetpgrp(STDIN_FILENO);
+			tc_pgid = tcgetpgrp(tag_files->ofd);
 			if (tc_pgid != man_pgid) {
 				if (tc_pgid == pager_pid) {
-					(void)tcsetpgrp(STDIN_FILENO,
+					(void)tcsetpgrp(tag_files->ofd,
 					    man_pgid);
 					if (signum == SIGTTIN)
 						continue;
@@ -567,7 +567,7 @@ out:
 			/* Once in the foreground, activate the pager. */
 
 			if (pager_pid) {
-				(void)tcsetpgrp(STDIN_FILENO, pager_pid);
+				(void)tcsetpgrp(tag_files->ofd, pager_pid);
 				kill(pager_pid, SIGCONT);
 			} else
 				pager_pid = spawn_pager(tag_files);
@@ -1097,7 +1097,7 @@ spawn_pager(struct tag_files *tag_files)
 		break;
 	default:
 		(void)setpgid(pager_pid, 0);
-		(void)tcsetpgrp(STDIN_FILENO, pager_pid);
+		(void)tcsetpgrp(tag_files->ofd, pager_pid);
 #if HAVE_PLEDGE
 		if (pledge("stdio rpath tmppath tty proc", NULL) == -1)
 			err((int)MANDOCLEVEL_SYSERR, "pledge");
@@ -1115,7 +1115,7 @@ spawn_pager(struct tag_files *tag_files)
 
 	/* Do not start the pager before controlling the terminal. */
 
-	while (tcgetpgrp(STDIN_FILENO) != getpid())
+	while (tcgetpgrp(STDOUT_FILENO) != getpid())
 		nanosleep(&timeout, NULL);
 
 	execvp(argv[0], argv);
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

             reply	other threads:[~2017-01-09 17:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 17:57 schwarze [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-02-05 22:25 schwarze
2017-01-28 23:35 schwarze
2017-01-27 14:23 schwarze
2017-01-27 14:19 schwarze
2017-01-27 13:59 schwarze
2017-01-12 15:48 schwarze
2017-01-11 17:47 schwarze
2017-01-10 23:40 schwarze
2017-01-10 22:04 schwarze
2017-01-09  2:28 schwarze
2017-01-09  2:26 schwarze
2017-01-09  2:22 schwarze
2016-11-10 12:52 schwarze
2016-10-20 17:52 schwarze
2016-10-20 17:40 schwarze
2016-10-20 17:36 schwarze
2013-09-18  2:24 mdocml: Merge rev schwarze
2013-09-18  1:55 schwarze
2013-09-17 20:42 schwarze
2013-09-17 20:39 schwarze

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=9367406458215565530.enqueue@fantadrom.bsd.lv \
    --to=schwarze@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /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).