[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: X-Windows Trouble



> I have es running in an xterm. I start another xterm from es using:
>	es> xterm &
> If I exit the shell BEFORE the xterm is mapped, it dies. If I exit after
> the mapping, it survives.

when i first read this, i wrote:

	i believe that this and your other problem can be solved
	by doing a
		{ newpgrp; xterm } &
	substituting whatever command you care about for xterm.

but then i finished reading Dave's note:
> I have tried using the newpgrp command, but I have ran out of ideas.

which got me to think a little more about it; i now believe this issue
is that the processes are getting SIGHUP'ed when the telnet connection
dies down.  so, my answer is, try this

	local (signals = $signals -sighup) xterm &

or, better,

	fn stay-around cmd {
		local (signals = $signals -sighup) {
			$cmd
		}
	}
	stay-around {xterm} &

does anyone else have any suggestions?  anybody else running es from
an x terminal and faced a similar problem?

sidenote:  should background jobs in es automatically ignore sigup?
it's easy to add that to %background in initial.es.  i can't think
of a reason not to add it, but i'm sure i'm missing something.

> PS: I hope this it the right way to get my question answered ... just out
>     of interest ... would it be more appropriate for this to be posted ?

this is the appropriate place.

paul