[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple screen -X commands "fast" after eachother fail
From: |
Michael Schroeder |
Subject: |
Re: Multiple screen -X commands "fast" after eachother fail |
Date: |
Wed, 17 Aug 2005 21:28:47 +0200 |
User-agent: |
Mutt/1.4.2.1i |
On Wed, Aug 17, 2005 at 08:19:15PM +0200, Wouter Coekaerts wrote:
> If I send multiple commands with screen -X, only the first one gets
> executed. An example (the problem is not with the stuff command itself,
> that's just an easy test case):
> "screen -X stuff abc; screen -X stuff def" will only put "abc" in the
> screen. Putting a "sleep 1" in between them fixes it.
>
> A script I wrote does something like this, and a Gentoo user originally
> reported this to me. I can't reproduce this on Debian sarge, but my (more
> or less up-to-date) Debian sid has the problem too. But they have the same
> screen version (4.00.02), so I don't know which version of what actually
> causes this.
Well, I can't reproduce this but I'm pretty sure I know how this
can happen. If named pipes are used the backend has to close and
reopen the pipe to clear the EOF status. If the second 'screen -X'
is fast enough it will write to the old pipe and thus get lost.
You can either
1) recompile screen to use unix domain sockets, or
2) recompile screen with BROKEN_PIPE defined in config.h, or
3) use the 'eval' command and only one 'screen -X' call.
Cheers,
Michael.
--
Michael Schroeder address@hidden
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}