Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114426 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88985 invoked from network); 12 May 2021 08:05:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 May 2021 08:05:05 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B307E18050A for ; Wed, 12 May 2021 01:13:03 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 12 May 2021 01:13:03 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id j10so32430032lfb.12 for ; Wed, 12 May 2021 01:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=XtC4zkrmZQlI5UkHw/Nv1H1GZG5CV9AkKSmVehSi108=; b=ERR2QpJ1OZto6Ih4w/iS5Fvh4tkse4yt9q29heBy0MeaZk9h6DFE8zzgQcEMN2IkN3 gPjlOc0/ghVNTHaraN7UUQUubqo0ZLeI7sqrwSzL5RqUyVY+mNv8D7mA536eU+iWilGE /DhY+Pu266CcZSbFgAE6F9V0jeUEiSMVuFSDVxz6p0/f6kFEf+t1RrDy1Sl1PmYuM1ui OIOxQGYeRwCc1v7L0iG2R60bqZGO7wEFge72GP/rKsZHQCY6SNhp+1mw+e+b5QlQ6MiK ow6g616GYiG9FUjHs4eo+VuKuPGG6EPQ9j3HktHoArF2DjWch9LAfr09DV+G59kPMxrt DiTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=XtC4zkrmZQlI5UkHw/Nv1H1GZG5CV9AkKSmVehSi108=; b=spaRsRapPixr50ZV/JPkbFcYyrpp2mpsNe16DWLV3aswHP32Wtxewlsns8PL6mjS2i NOopYrY8Y0rwyN+3/LnPeWyWjPMgM2crIKr2jAN4uJGVk2Zjn5QKoO/GP3TUSUH5z8mg /6ufGgwqRbU1CN7YRv2RYp2Q9RigFHOfr0OlLf9OiG7qHeDNiIlrVZeNE3QajrqSJFTv OF+8LQ0/TKiKw/s4zAbUgUk2A55I6hDi3M6e1owDRpZZAqPuPRmb9TQdmKu6izQAV88T B2dLwEUanwgVF3MRltUzKo29b3/yWuHf2Z5r/Cj16vd2asdgqZge6HfnU7M4RDwc5F7q DhXw== X-Gm-Message-State: AOAM530Vw7vL2oVveslrGNzDeV0c6ZZsI1MMGVDSuwcAcRMyu66ONJdO 5Bo87tjqHWiwCOUpkKj/or/xmWkI092aX3WbLWJ6cZn5uP9sEg== X-Google-Smtp-Source: ABdhPJzeuRm5xknv9GbmB8OWzUT2FEVCbF/60O+69Tg8XeiUJs0Rur7SzXqMM3bf8xMd1BGwndYTfkN4+lcLoATbaOU= X-Received: by 2002:a19:48d3:: with SMTP id v202mr23600417lfa.315.1620807179758; Wed, 12 May 2021 01:12:59 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 12 May 2021 10:12:43 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="00000000000032eeec05c21d94df" Subject: Disable interactive mode (-a) if readline not available From: nikita.ppv@gmail.com (Nikita Popov) --00000000000032eeec05c21d94df Content-Type: text/plain; charset="UTF-8" Hi internals, If the readline extension is enabled, PHP provides an interactive shell under -a. If it is not enabled, it falls back to an "interactive mode" (yes, the difference between "interactive shell" and "interactive mode" is important here). The interactive mode is simply an stdin input, which needs to be terminated using Ctrl+D. You can only run one script that way. I think the current behavior is quite confusing, because it's really not obvious that you ended up in this fallback mode (you need to know the difference between "shell" and "mode" in the output) and most people wouldn't know what to do with it. The latest instance of this is https://bugs.php.net/bug.php?id=81033. I think we would be better off disabling -a completely if readline is not available, and exit with a helpful error message. I've opened https://github.com/php/php-src/pull/6976 to that effect. Does that sound reasonable? Regards, Nikita --00000000000032eeec05c21d94df--