The popen topic crashes my phone's browser



  • My IE browser on WP8.1 crashes every time I try to open the popen topic. Is this happening to anyone else, on Windows Phone or otherwise?

    EDIT
    Here's the URL:
    https://what.thedailywtf.com/t/headdesk-popen-in-c/49374


  • BINNED

    It's not your phone that is the problem



  • Works just fine on Firefox ...
    🐈


    Filed under: [Another triumphant victory for the grumpy cats!](#tag)

  • FoxDev

    Chrome handles it without fault too


  • kills Dumbledore

    Windows 8.1, Chrome is fine, IE shits its pants.

    What the hell did you do in that topic, @PJH?


  • BINNED

    That one I knew ... I opened the topic specifically in IE11 to get this.
    Who uses IE when it is not necessary



  • @Jaloopa said:

    What the hell did you do in that topic, @PJH?

    I would also like to know this.



  • Spoiled a link and posted code, it seems.


  • Discourse touched me in a no-no place

    Jeff knows. I just posted

    • Intro
    • Some fenced code
    • a 'spoilers' header
    • spoilers with ­'s and a URL.

    original (and current incarnation since people have/are nitpicking stuff that unintentionally crept in during anonymization if anyone wants to play in One Post):

    Original:

    I have only myself to blame for this one, having spent 2 minutes writing
     it and 2 days on it figuring out :wtf: was causing the symtoms I was 
    seeing, namely calling /usr/local/sbin/in-house-program (from the inner 
    clause) returned data when called from the command line but was 
    returning nothing from the code presented here:
    
    ```
        if( !(fp = popen("/usr/sbin/in-house-program","r")) ){ // try /usr/bin first
            if( !(fp = popen("/usr/local/sbin/in-house-program","r")) ){ // 
    else try /usr/local/sbin
                    // log fact that both failed
                    return;
    
                }
            }
        }
    ```
    
    
    
    Spoilers:
    [spoiler]
    The first popen() always 
    succeeds regardless of whether the program in quotes exists, since what 
    popen() would fail on is calling the `sh` that tries to call the program
     in quotes.
    ­
    Thus the second, inner, clause never gets called under normal 
    circumstances, and if it got that far it too would probably fail anyway 
    for the same reason the first would  - i.e. before it even considered 
    what was in the quotes.
    ­
    Anyway - that was my main headdesk moment.... Others:
    WTF#2: the fact that the program could be in one of two places to begin 
    with which I was trying to mitigate
    WTF#3: output from the program succeeding but having nothing to report, 
    is the same as the program not running at all.
    [/spoiler]
    
    :headdesk:
     
      [1]: http://linux.die.net/man/3/popen
    

    Current:

    I have only myself to blame for this one, having spent 2 minutes writing
     it and 2 days on it figuring out :wtf: was causing the symtoms I was 
    seeing, namely calling /usr/local/sbin/in-house-program (from the inner 
    clause) returned data when called from the command line but was 
    returning nothing from the code presented here:
    ```cpp
        if( !(fp = popen("/usr/sbin/in-house-program","r")) ){ /* try /usr/sbin first */
            if( !(fp = popen("/usr/local/sbin/in-house-program","r")) ){ /* else try /usr/local/sbin */
                    /* log fact that both failed */
                    return;
            }
        }
    ```
    
    
    
    Spoilers:
    [spoiler]
    The first popen() always 
    succeeds regardless of whether the program in quotes exists, since what 
    popen() would fail on is calling the `sh` that tries to call the program
     in quotes.
    ­
    Thus the second, inner, clause never gets called under normal 
    circumstances, and if it got that far it too would probably fail anyway 
    for the same reason the first would  - i.e. before it even considered 
    what was in the quotes.
    ­
    Anyway - that was my main headdesk moment.... Others:
    WTF#2: the fact that the program could be in one of two places to begin 
    with which I was trying to mitigate
    WTF#3: output from the program succeeding but having nothing to report, 
    is the same as the program not running at all.
    [/spoiler]
    
    :headdesk:
     
      [1]: http://linux.die.net/man/3/popen
    


  • Seems to be the combination of ­ and linebreak and spoiler:
    https://what.thedailywtf.com/t/spoiler-shy-spoiler/49379



  • FWIW: also kills IE11 for me



  • GEWOOOOOOOOOOOOOOOOOOOOON

    watanders


  • Discourse touched me in a no-no place

    @Jaloopa said:

    Windows 8.1, Chrome is fine, IE shits its pants.

    This sounds fun! Well done, Microsoft!


Log in to reply