zsh-users
 help / color / mirror / code / Atom feed
* Terminal hang when bg/fg root shell on OS X
@ 2006-02-10 19:45 James F. Hranicky
  2006-02-10 21:14 ` William Scott
  2006-02-11 19:55 ` Bart Schaefer
  0 siblings, 2 replies; 4+ messages in thread
From: James F. Hranicky @ 2006-02-10 19:45 UTC (permalink / raw)
  To: zsh-users

When I background then foreground a root shell on OS X I get
a terminal error:

	% 1005 : su -
	Password:
	# exec zsh
	# suspend
	
	zsh: suspended  su -
	% fg
	[1]  + continued  su -
	# zsh: suspended (signal)  su -
	% <hit return>
	#
	zsh: error on TTY read: Input/output error

The terminal is hung after this. This doesn't appear to happen
when suspending a user shell and going back to a root shell.

Anyone have any ideas?

----------------------------------------------------------------------
| Jim Hranicky, Senior SysAdmin                   UF/CISE Department |
| E314D CSE Building                            Phone (352) 392-1499 |
| jfh@cise.ufl.edu                      http://www.cise.ufl.edu/~jfh |
----------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Terminal hang when bg/fg root shell on OS X
  2006-02-10 19:45 Terminal hang when bg/fg root shell on OS X James F. Hranicky
@ 2006-02-10 21:14 ` William Scott
  2006-02-11 19:55 ` Bart Schaefer
  1 sibling, 0 replies; 4+ messages in thread
From: William Scott @ 2006-02-10 21:14 UTC (permalink / raw)
  To: James F. Hranicky; +Cc: zsh-users


You might want to consider this workaround, which has the additional merit
of not requiring the root account to be activated (the default on OS X and
Ubuntu Linux, for security reasons):

Just type

sudo screen zsh

You then get a root shell, and can detach it with control-d, reattach it
when you need it, and so forth.

HTH.

Bill



On Fri, 10 Feb 2006, James F. Hranicky wrote:

> When I background then foreground a root shell on OS X I get
> a terminal error:
>
> 	% 1005 : su -
> 	Password:
> 	# exec zsh
> 	# suspend
>
> 	zsh: suspended  su -
> 	% fg
> 	[1]  + continued  su -
> 	# zsh: suspended (signal)  su -
> 	% <hit return>
> 	#
> 	zsh: error on TTY read: Input/output error
>
> The terminal is hung after this. This doesn't appear to happen
> when suspending a user shell and going back to a root shell.
>
> Anyone have any ideas?
>
> ----------------------------------------------------------------------
> | Jim Hranicky, Senior SysAdmin                   UF/CISE Department |
> | E314D CSE Building                            Phone (352) 392-1499 |
> | jfh@cise.ufl.edu                      http://www.cise.ufl.edu/~jfh |
> ----------------------------------------------------------------------
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Terminal hang when bg/fg root shell on OS X
  2006-02-10 19:45 Terminal hang when bg/fg root shell on OS X James F. Hranicky
  2006-02-10 21:14 ` William Scott
@ 2006-02-11 19:55 ` Bart Schaefer
  2006-02-13 14:08   ` James F. Hranicky
  1 sibling, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2006-02-11 19:55 UTC (permalink / raw)
  To: zsh-users

On Feb 10,  2:45pm, James F. Hranicky wrote:
}
} When I background then foreground a root shell on OS X I get
} a terminal error:

The "exec zsh" is a contributing factor here.

I suspect that you're running into a combination of problems with the
tty's controlling process having changed and with the fact that a
process owned by a normal user (parent shell, before the "su") can't
send a signal to a process owned by root.

Either change root's shell to zsh permanently, or try using

	su -l -c zsh

instead of exec'ing zsh after the fact.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Terminal hang when bg/fg root shell on OS X
  2006-02-11 19:55 ` Bart Schaefer
@ 2006-02-13 14:08   ` James F. Hranicky
  0 siblings, 0 replies; 4+ messages in thread
From: James F. Hranicky @ 2006-02-13 14:08 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

On Saturday 11 February 2006 14:55, Bart Schaefer wrote:
> On Feb 10,  2:45pm, James F. Hranicky wrote:
> }
> } When I background then foreground a root shell on OS X I get
> } a terminal error:
>
> The "exec zsh" is a contributing factor here.
>
> I suspect that you're running into a combination of problems with the
> tty's controlling process having changed and with the fact that a
> process owned by a normal user (parent shell, before the "su") can't
> send a signal to a process owned by root.
>
> Either change root's shell to zsh permanently, or try using
>
> 	su -l -c zsh
>
> instead of exec'ing zsh after the fact.

I can't suspend login shells, though :->

Even running su -c zsh gives the same terminal problem. 

Fortunately, 

	sudo zsh

seems to work just fine with backgrounding and foregrounding.

Thanks,
Jim


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-02-13 14:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-10 19:45 Terminal hang when bg/fg root shell on OS X James F. Hranicky
2006-02-10 21:14 ` William Scott
2006-02-11 19:55 ` Bart Schaefer
2006-02-13 14:08   ` James F. Hranicky

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).