Announcement

Collapse
No announcement yet.

Konsole's -e option causes segfault?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Konsole's -e option causes segfault?

    Anyone else notice this? I'm considering submitting a bug report, but I want to make sure it's not just me.
    Here's there terminal output of Konsole (how recursive) when the -e option is used:
    Code:
    sheeettin@sheeettin-kubuntu:~$ konsole -e "echo foo"
    kdecore (KProcess): WARNING: _attachPty() 11
    konsole: WARNING: Unable to open a pseudo teletype!
    Uh oh.. can't get terminal attributes..
    I'm guessing the 11 in the kdecore line refers to signal 11, SIGSEGV, the segfault.
    Would anyone mind testing the -e option (e.g. "konsole -e 'echo foo'") to see if it does anything?

    It may also just be what I'm executing, as Docking Station (a game)'s launch script does this, but the America's Army (another game) and Sauerbraten (yet another) launch scripts don't.
    For external use only.

    #2
    Re: Konsole's -e option causes segfault?

    Confirmed - more or less:

    Code:
    USER # konsole -e "echo foo"
    kdecore (KProcess): WARNING: _attachPty() 11
    konsole: WARNING: Unable to open a pseudo teletype!
    Uh oh.. can't get terminal attributes..
    Additional pop-up window:

    Konsole is unable to open a PTY (pseudo teletype). [...]
    Konsole needs to have read/write access to the PTY(s).


    --

    Addenum: Plain KDE 3.5.5 on Debian 4.0 shows similar behaviour but without the "kdecore" part.

    Comment


      #3
      Re: Konsole's -e option causes segfault?

      Yeah, I forgot to include the window in my post.

      Investigating the permissions thing, I see that /dev/pt* is (are?) 0666 root:tty, and /dev/pts/* is readable-writable to me.

      I guess I'll submit a bug report (assuming there isn't one).

      EDIT: Bug 143786.
      For external use only.

      Comment


        #4
        Re: Konsole's -e option causes segfault?

        It's not a bug. Try konsole -e echo foo not konsole -e "echo foo"
        The konsole closes after it echos so try something like
        konsole -e ls -R /usr
        You will see it working and then close at the end of the ls command.

        Comment


          #5
          Re: Konsole's -e option causes segfault?

          It should work regardless of quotation marks.

          And if not, there should be something in the --help or the man page to the effect of "-e should be the last option specified in order to deal with spaces, etc.".
          For external use only.

          Comment


            #6
            Re: Konsole's -e option causes segfault?

            Originally posted by SheeEttin
            It should work regardless of quotation marks.

            And if not, there should be something in the --help or the man page to the effect of "-e should be the last option specified in order to deal with spaces, etc.".
            This might be your opinion, and you are entitled to it, but all you need to do is try "echo foo" from the command line. You will get a command not found. Now maybe some other shell might do something different but that is what bash gives you when you try it. SO if you have a good reason why quotes should not matter I'm all ears.

            Comment


              #7
              Re: Konsole's -e option causes segfault?

              Originally posted by SheeEttin
              It should work regardless of quotation marks.
              I'd rather word it a little different: Konsole should not crash because of quotations marks.

              Code:
              USER # konsole -e "echo blurb" # miscoded
              kdecore (KProcess): WARNING: _attachPty() 11 # BAD
              USER # konsole -e echo "blurb" # bash style
              kdecore (KProcess): WARNING: _attachPty() 11 # BAD
              Code:
              USER # konsole -e blurb
              konsole: ERROR: can not execute blurb # GOOD

              Comment


                #8
                Re: Konsole's -e option causes segfault?

                Originally posted by UnicornRider
                Originally posted by SheeEttin
                It should work regardless of quotation marks.
                I'd rather word it a little different: Konsole should not crash because of quotations marks.

                Code:
                USER # konsole -e "echo blurb" # miscoded
                kdecore (KProcess): WARNING: _attachPty() 11 # BAD
                USER # konsole -e echo "blurb" # bash style
                kdecore (KProcess): WARNING: _attachPty() 11 # BAD
                Code:
                USER # konsole -e blurb
                konsole: ERROR: can not execute blurb # GOOD
                I did a google search on _attachPty(). I was looking for some info about the 11. I wanted to see if it was a signal or something else. What I found was very interesting, well to me at lest. Every one of the hits was from a ubuntu or kubuntu user. I thought I would come up with something from KDE, there are a whole bunch of KDE users, but I didn't just ubuntu and kubuntu users. So there has been some change to KDE that raises this very uninformative error message. I got out my laptop that has SLackware on it. It tried konsole -e "echo foo" This gave no errors or warnings but I did get a konsole titled echo foo. I then tried konsole -e echo "foo" and it worked. Using Slackware I didn't get any warnings or errors at all and it worked just like it was supposed to. So I don't think this is a KDE problem but rather a Kubuntu/ubuntu problem.

                Comment


                  #9
                  Re: Konsole's -e option causes segfault?

                  Originally posted by ArkRoyal
                  SO if you have a good reason why quotes should not matter I'm all ears.
                  Because it should be passing
                  Code:
                  echo foo
                  not
                  Code:
                  "echo foo"
                  .
                  However, I don't think that's what's happening here.

                  Right now, I'm looking for the source of kdecore to figure out what _attachPty() looks like.
                  For external use only.

                  Comment


                    #10
                    Re: Konsole's -e option causes segfault?

                    Originally posted by UnicornRider
                    Addenum: Plain KDE 3.5.5 on Debian 4.0 shows similar behaviour [...]
                    Originally posted by ArkRoyal
                    So I don't think this is a KDE problem but rather a Kubuntu problem.
                    1. read, 2. think, 3. write :P

                    Comment


                      #11
                      Re: Konsole's -e option causes segfault?

                      Well, my bug got closed as a duplicate of bug 120322, which does not seem to be making much progress.

                      Reading a bit more carefully, what I mentioned above may be what's happening.
                      For external use only.

                      Comment


                        #12
                        Re: Konsole's -e option causes segfault?

                        Originally posted by UnicornRider
                        Originally posted by UnicornRider
                        Addenum: Plain KDE 3.5.5 on Debian 4.0 shows similar behaviour [...]
                        Originally posted by ArkRoyal
                        So I don't think this is a KDE problem but rather a Kubuntu problem.
                        1. read, 2. think, 3. write :P
                        Gee and all this time I thought it was read , evaluate, apply, repeat.

                        Comment


                          #13
                          Re: Konsole's -e option causes segfault?

                          I just go with rinse & repeat.
                          Simple and alliterative.
                          For external use only.

                          Comment


                            #14
                            Re: Konsole's -e option causes segfault?

                            Originally posted by SheeEttin
                            I just go with rinse & repeat.
                            Simple and alliterative.
                            I guess that is why your code doesn't run. Maybe you might want to take a couple of classes in Comp. Sci. Then things like Read, Evaluate, Apply and Repeat won't look so strange to you.

                            Comment

                            Working...
                            X