- (bal) Changed from GNU rx to PCRE on suggestion from djm.
 - (bal) Integrated Sony NEWS-OS patches from NAKAJI Hirouyuki
   <nakaji@tutrp.tut.ac.jp>
diff --git a/pty.c b/pty.c
index cbbe584..04004d2 100644
--- a/pty.c
+++ b/pty.c
@@ -242,6 +242,10 @@
 	 */
 	ioctl(*ttyfd, TIOCSCTTY, NULL);
 #endif /* TIOCSCTTY */
+#ifdef HAVE_NEWS4
+	if (setpgrp(0,0) < 0)
+		error("SETPGRP %s",strerror(errno));
+#endif /* HAVE_NEWS4 */
 #ifdef USE_VHANGUP
 	old = signal(SIGHUP, SIG_IGN);
 	vhangup();