[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: order of flags
From: |
James |
Subject: |
Re: order of flags |
Date: |
Sat, 26 Jul 2008 15:04:42 -0400 |
cool! thanks for the research-- it's the best reply i've gotten in a while!
cheers,
_J
On 7/26/08, Micah Cowan <address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> James wrote:
> > hello,
> > just wanted to know why the following command gives:
> >
> > $ screen -RRx
> > There is no screen to be attached.
> >
> > whereas typing:
> >
> > $ screen -xRR
> >
> > gives a new screen session. (or attaches to an existing one with multiuser
> mode)
> >
> > at the moment i'm using the second command as my "always run screen
> > like this" favorite...
> >
> > wasn't sure if this was a bug or a weirdism of screen.
> > let me know your thoughts or i should be doing something differently,
> thanks.
>
>
> Looking at the code:
>
> ...
> case 'r':
> case 'R':
> #ifdef MULTI
> case 'x':
> #endif
> if (ac > 1 && *av[1] != '-' && !SockMatch)
> {
> SockMatch = *++av;
> ac--;
> debug2("rflag=%d, SockMatch=%s\n", dflag, SockMatch);
> }
> #ifdef MULTI
> if (*ap == 'x')
> xflag = 1;
> #endif
> if (rflag)
> rflag = 2;
> rflag += (*ap == 'R') ? 2 : 1;
> break;
> ...
>
> It appears that -x always includes the functionality of specifying -r; so
> screen -RRx
> is the same as
> screen -xRr
> In both versions, rflag ends up at 3, whereas with
> screen -xRR
> rflag ends up at 4, just like -RR.
>
> I don't know enough about rflag to know the full meaning of this. I'm
> not certain what was intended, but I'm guessing -x was intended to imply
> - -r on its own, but messing with existing -r/-R combos wasn't intentional.
>
> I've filed an issue for this at
> https://savannah.gnu.org/bugs/index.php?23939
>
> - --
> Micah J. Cowan
> Programmer, musician, typesetting enthusiast, gamer,
> and GNU Wget Project Maintainer.
> http://micah.cowan.name/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFIi24H7M8hyUobTrERAlfaAKCFdjjpUZDL9XIXWH6YhZCDYm6wawCdHqvD
> udn1TmlzNmeOrACvyRyAAhs=
> =LAb8
> -----END PGP SIGNATURE-----
>