Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh hangs on IRIX 5.2 / me to: (SunOS4.1.3 + Solaris 2.4)



schaefer@xxxxxxxxxxxxxx wrote:
> I think this is what is wanted:
> 
> 		if (pgrp != mypgrp && kill(pgrp, 0) == -1)
> 		    attachtty(mypgrp);
> 		else {

That's got to work, since it'll only try the attachtty(mypgrp) once
and then fail.  Here's that as a patch for everyone to try at home.

*** Src/utils.c.pgrp	Wed Mar 27 09:17:42 1996
--- Src/utils.c	Wed Mar 27 09:17:09 1996
***************
*** 2597,2603 ****
  # endif
  #endif
  	{
! 	    if (kill(pgrp, 0) == -1)
  		attachtty(mypgrp);
  	    else {
  		zerr("can't set tty pgrp: %e", NULL, errno);
--- 2597,2603 ----
  # endif
  #endif
  	{
! 	    if (pgrp != mypgrp && kill(pgrp, 0) == -1)
  		attachtty(mypgrp);
  	    else {
  		zerr("can't set tty pgrp: %e", NULL, errno);

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.




Messages sorted by: Reverse Date, Date, Thread, Author