Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Stopped (tty output)

254 views
Skip to first unread message

Stuart

unread,
Mar 1, 2009, 6:01:20 PM3/1/09
to

Hello,

I'm having this problem; my TclTk does not exit cleanly when I run
it in background.

I obtain this message: [4] + Stopped (tty output) Client.tcl

Although, I don't understand why it does this, my exit button has this
command:
button .map.info.exit -text "EXIT" -command {puts "OK"; flush stdout ;
destroy .; exit} \
-font medfont -fg red -bg bisque -relief raised\
-activebackground green

The "OK" does come out followed by the Stopped tty message. So I
wonder what is exactly the
"tty" is choking on.

The client is standalone (although it can hook up to other clients via
socket, however, I get this
error even if it doesn't hook up to anything) and is not piped into
anything.

Any ideas on why this occurs?

Thanks in advance,

Stuart

Stuart

unread,
Mar 1, 2009, 6:10:08 PM3/1/09
to

Oh, I'm running this app under Solaris using the BLT extension within
the cshell

The output of stty is:
stuart @ akala % stty
speed 38400 baud; -parity
rows = 24; columns = 113; ypixels = 0; xpixels = 0;
eol = -^?; eol2 = -^?; swtch = <undef>;
brkint -inpck -istrip icrnl imaxbel onlcr tab3
echo echoe echok echoctl echoke iexten


Stuart

Alexandre Ferrieux

unread,
Mar 1, 2009, 6:16:15 PM3/1/09
to
On Mar 2, 12:01 am, Stuart <bigdak...@aol.com> wrote:
>
>   I'm having this problem; my TclTk does not exit cleanly when I run
> it in background.
> I obtain this message: [4]  + Stopped (tty output) Client.tcl
> button .map.info.exit -text "EXIT" -command {puts "OK"; flush stdout ;
> destroy .; exit} \
> The "OK" does come out followed by the  Stopped tty message.

Hmm, indeed seeing the OK is weird. Under these circumstances I'd
expect it not to appear, since the write() generated the signal...

Maybe we could proceed with an strace. For this, assuming your outer
shell is csh:

strace -o tra -f -tt csh
% client.tcl &
Stopped (tty output) Client.tcl
% exit

Please send me the 'tra' file by e-mail.

-Alex

Stuart

unread,
Mar 3, 2009, 3:09:44 AM3/3/09
to
On Mar 1, 1:16 pm, Alexandre Ferrieux <alexandre.ferri...@gmail.com>
wrote:


It looks like I goofed, the "OK" didn't come out. I guess
I ran it in the foreground.. but I cudda sworn I ran it in background.
Either way, its still a nuisance.

I've tried that strace, but it didn't seem to do anything.

Stuart

Alexandre Ferrieux

unread,
Mar 3, 2009, 4:20:45 AM3/3/09
to

There's no mystery, then. When the terminal has the proper setting
(stty tostop), a background process is not allowed to write to the
terminal.
If you want to disable this behavior (which may or may not be the
default depending on the local setup), use 'stty -tostop'. You might
want to do this in your .cshrc or equivalent.

-Alex

Uwe Klein

unread,
Mar 3, 2009, 5:29:31 AM3/3/09
to
I seem to remember a similar question some time ago (can't find it though).

redirect stdin, stdout, stderr

uwe

0 new messages