From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by c5ff346549e7 (Postfix) with ESMTPS id 1057B5D6 for ; Mon, 1 Apr 2019 09:06:35 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,296,1549926000"; d="scan'208";a="376609136" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 01 Apr 2019 11:06:02 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id 891BA8267F; Mon, 1 Apr 2019 11:06:02 +0200 (CEST) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id B68DA7F61F for ; Mon, 1 Apr 2019 11:05:48 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jdimino@janestreet.com; spf=Pass smtp.mailfrom=jdimino@janestreet.com; spf=None smtp.helo=postmaster@mxout5.mail.janestreet.com IronPort-PHdr: =?us-ascii?q?9a23=3AJ6+RbhIdtBpUwPbTHtmcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgeL/nxwZ3uMQTl6Ol3ixeRBMOHsqoC2rad6/CocFdDyK7JiGoFfp1IWk1Nou?= =?us-ascii?q?QttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZr?= =?us-ascii?q?KeTpAI7SiNm82/yv95HJbAhEmSaxbal2IRi5ogndqsobipZ+J6gszRfEvmFGcP?= =?us-ascii?q?lMy2NyIlKTkRf85sOu85Nm7i9dpfEv+dNeXKvjZ6g3QqBWAzogM2Au+c3krgLD?= =?us-ascii?q?QheV5nsdSWoZjBxFCBXY4R7gX5fxtiz6tvdh2CSfIMb7Q6w4VSik4qx2UxLjlj?= =?us-ascii?q?sJOCAl/2HWksxwjbxUoBS9pxxk3oXYZJiZOOdicq/BeN8XQ3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ngCjY0HIpono0+Jn1lEtDntSjtmiqnB7hPx+6OFJsp7v+a2nHwI4B/wnDLz7?= =?us-ascii?q?U7glQ6BMBIMD/+iw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DsCAAm06FcfRLp10BjHgEGBwaBZYJ5g?= =?us-ascii?q?QMnhA6MHocogg2aOBAlhEcChUMaBwEENBIBAQMBAQkBAwEBARMBAQsUCEwMgjo?= =?us-ascii?q?pAYJnAQUjHQEBNwEPCwsNAgImAgIiEgEFARwGExQHgwiBXQMVD5xrPIoscYEvg?= =?us-ascii?q?nkBAQWHHQMFEnkkhF6GVReBQD+DdS4+gQQBgRVHAoRrglelTQmHcYtvGoIDiWG?= =?us-ascii?q?ISJFQjVYPIYFDgXczGggbFTsxBoI1ggoYg1aKVD4zkFsBAQ?= X-IPAS-Result: =?us-ascii?q?A0DsCAAm06FcfRLp10BjHgEGBwaBZYJ5gQMnhA6MHocogg2?= =?us-ascii?q?aOBAlhEcChUMaBwEENBIBAQMBAQkBAwEBARMBAQsUCEwMgjopAYJnAQUjHQEBN?= =?us-ascii?q?wEPCwsNAgImAgIiEgEFARwGExQHgwiBXQMVD5xrPIoscYEvgnkBAQWHHQMFEnk?= =?us-ascii?q?khF6GVReBQD+DdS4+gQQBgRVHAoRrglelTQmHcYtvGoIDiWGISJFQjVYPIYFDg?= =?us-ascii?q?XczGggbFTsxBoI1ggoYg1aKVD4zkFsBAQ?= X-IronPort-AV: E=Sophos;i="5.60,296,1549926000"; d="scan'208";a="376608998" X-MGA-submission: =?us-ascii?q?MDHJqxekUcbS5Bi9bxUBEpVuQ2SIE79SelTMEn?= =?us-ascii?q?Qb1RV8TaZPQ9+TN51uv0FRc6F2DbqFl7RzQApNtMSpeaCMqBF23G9t/V?= =?us-ascii?q?jGJIyn6hNQBV3A8nxKJQJizyijeq+P2RzRRsOQ1v15kx0n7Qi9QjXKN6?= =?us-ascii?q?WVdrpweAGNTirwdXvPoJaQtg=3D=3D?= Received: from mxout5.mail.janestreet.com ([64.215.233.18]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2019 11:05:47 +0200 X-JS-Received: from [30.40.81.8] (helo=tot-qpr-mailcore1) by mxout5.mail.janestreet.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1hAssz-0001pv-1t for caml-list@inria.fr; Mon, 01 Apr 2019 05:05:45 -0400 X-JS-Flow: external X-JS-Received: by tot-qpr-mailcore1 with ocaml/mailcore/main_production (870af81d9135) (envelope-from ) id BcodRp-73vvIA-A8; 2019-04-01 05:05:45.042268-04:00 X-JS-Scanner-attachment: No attachments X-JS-Scanner-esets: Not scanned (internal mail) Received: from mail-lj1-f199.google.com ([209.85.208.199]) by mxgoog2.mail.janestreet.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1hAssy-0005N4-Ss for caml-list@inria.fr; Mon, 01 Apr 2019 05:05:45 -0400 Received: by mail-lj1-f199.google.com with SMTP id g26so2305757ljd.20 for ; Mon, 01 Apr 2019 02:05:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j7ddBU8MjH/IiRks25sxtY6tUJyMObk9Q3BdgzU3Zrw=; b=ykT9MxfU98ScmLboHS/yJlU/jAadjGTXMRIdJKPYSkRbW4Z/7qs6oKYcRuIEd/qs93 nA1mO9OQf05PYOTM//MMBwtyNsF36M3RcRr7KGlWVsqQbuhHSoZvMceNHyZwlrkoZrje FcxA+ep35wNjcryW/NOsdQChKm9BFFGmpONTQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j7ddBU8MjH/IiRks25sxtY6tUJyMObk9Q3BdgzU3Zrw=; b=XffcwbWnOaoDIy2mKXFgdLJOJhfML+EtljWKtwbTROOq4q5u6AeN3oFMu0D9WABpvN WrbXkKVNdo/FqUwC1lqWbsQzX8eHelm0efNYrTZ08UzPopE/mrjlvk8GlPXYi6X3qcXf N4ZDbZJ5kdDJnPH76YDXJ9M4xyaV9NaLg26BM+6x6iEVvfvzU/iuguonubnOKmIM8Aw4 Tv1wZAvh+eKZ6kdZpFOrvigqQh/24W1LSEIyg8DXe3YnFdqp8jTc/aPwCLJ+xe6j5/et qxoYRHSecVWe9Gprc6LcyUf584ys5NuGv9JAx2P9CKKIffqcswGJ2xKEBcn/EZ99CuCy l4kQ== X-Gm-Message-State: APjAAAWtqOKMzGxe9T3Kd52KO8cLUUqUAT5PSbluUE5r3UV81p1eDDDf poHrClWvqxbhSt8wW9l7tq1CScTBF76cNbqtfGSZQ3Y4N73KZpLg4xr93gZQU7KX2thR8P41wjX 1yOBb0RolQqyKY4mqwbtNtj+kHQ== X-Received: by 2002:ac2:5581:: with SMTP id v1mr6433624lfg.92.1554109543729; Mon, 01 Apr 2019 02:05:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSR0qaPG6s4h70yfrxJwcVhkXbUUHrmdUILNmQEHSQ6ZolmNjrcPIz2tc3GBGR8oUXOZq/7zJVP+s72LvUrNM= X-Received: by 2002:ac2:5581:: with SMTP id v1mr6433607lfg.92.1554109543406; Mon, 01 Apr 2019 02:05:43 -0700 (PDT) MIME-Version: 1.0 References: <21AC2517-8185-45A3-8520-53C92761CBBA@gmx.net> In-Reply-To: <21AC2517-8185-45A3-8520-53C92761CBBA@gmx.net> From: Jeremie Dimino Date: Mon, 1 Apr 2019 10:05:32 +0100 Message-ID: To: Helmut Brandl Cc: caml users Content-Type: text/plain; charset="UTF-8" X-JS-Exim-Data-Received: 2019-04-01 05:05:45-0400 X-JS-Processed-by: mailcore Subject: Re: [Caml-list] Turn echoing off on standard input to read e.g. passwords Reply-To: Jeremie Dimino X-Loop: caml-list@inria.fr X-Sequence: 17449 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi Helmut, If you don't mind the extra dependency, there is a complete example in the lambda-term library: https://github.com/ocaml-community/lambda-term/blob/master/examples/read_password.ml The main differences with the other solutions mentioned in this thread are that this version works on Windows, supports line edition and supports customisation such as displaying nothing or displaying stars. Best, Jeremie On Thu, Mar 28, 2019 at 8:04 PM Helmut Brandl wrote: > > Hello list, > > Is there a portable way in ocaml to turn echoing off on standard input from the terminal to read e.g. passwords? By portable I mean that it works for Windows, Unix and Mac. > > Thanks for any hint. > > Regards > Helmut -- Jeremie