From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 25628 invoked from network); 19 Dec 2020 02:25:06 -0000 Received: from ewsd.inri.net (107.191.116.128) by inbox.vuxu.org with ESMTPUTF8; 19 Dec 2020 02:25:06 -0000 Received: from mail-qv1-f51.google.com ([209.85.219.51]) by ewsd; Fri Dec 18 21:07:14 -0500 2020 Received: by mail-qv1-f51.google.com with SMTP id u16so1893013qvl.7 for <9front@9front.org>; Fri, 18 Dec 2020 18:07:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition; bh=J3Sq848A//dO5n9rKvMI8/6HijoR+R25Cs2DpvpByn4=; b=TUu4nQxG5cHOguUs8bYgH7K8jMxgJNRSMWA+3akusyOT/6WbkjUJkOU57gUGxuKM68 28geTOMc4Aiwvtmy8WJefC7liOMzcliyEMB0SGnKeBiBHsxEITvPEZDMnBGjocRvjGc7 5N5xlJvTEm7eOPrYe5rnntsUX+YFIk/6kVGdryo8DAGYChSZzWatPSjQEz/TWHVW615H hkB5/vIvEyFZs8Ee9YPfXVKrhn+t80fy+3+akE3am2FLvfAFPSeTofBW+hmNG7BcD9Rq X74v1ZqE4isaCC3uIHJKumdEO3h90hXK+hUa92etbv7JoBjZl1c8nXuTEc07VJUa3SIS teCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=J3Sq848A//dO5n9rKvMI8/6HijoR+R25Cs2DpvpByn4=; b=WnWY1ET++kNcoBsyjbyEbDvI1ov7yEOJFmxAv2dO4CbZv4doIwQqBxNaxVOC4ue3rP 8TOjXqL6Ny6LII6iaiIleEpckpM9JB7vk/pmzosC/SMAmEZLdgLjS2e7nHJfYb6FgzfN PfWRm2lnWJ8/SJWlTNGmB+4vshMIMKWa+m1MWzzH+h6tFRQx44xIQFrJhIrUStqkXeJC uDyNoywdPBbMk1BJGKJNGtcin/jpGdHr4gkQYz906jcikTUaeYwiZz9sMMYarzLnq3BW 0Q0WDyDrthPZx3TCiSt0kRtAaqA3E+lIJay/+Y5o8wSXXO99ce+SQiTyu1ReEwJbGIgH ++Hg== X-Gm-Message-State: AOAM533k51RgvozV6lDafYYSqpuIH1rvjqSoaDDEXPWj3AKaSLfboK21 w0snXgjA6vCPQJhKo8QfxryUQmDPmd0= X-Google-Smtp-Source: ABdhPJzEDg8UXGSa+6+AOPAp5SZBxvd9LnWvLN5nyJzNfMVBuUPp1BIokpdkZkHaR6BEIEbcSCOuUA== X-Received: by 2002:a0c:f4cd:: with SMTP id o13mr7587367qvm.31.1608343625273; Fri, 18 Dec 2020 18:07:05 -0800 (PST) Return-Path: Received: from delta.localdomain (pool-74-101-98-214.nycmny.fios.verizon.net. [74.101.98.214]) by smtp.gmail.com with ESMTPSA id j142sm7128646qke.117.2020.12.18.18.07.04 for <9front@9front.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Dec 2020 18:07:04 -0800 (PST) Date: Fri, 18 Dec 2020 21:07:02 -0500 From: Fazlul Shahriar To: 9front@9front.org Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: agile private element NoSQL database Subject: [9front] [PATCH] vt: rfork environment varibles Reply-To: 9front@9front.org Precedence: bulk Hi, The patch below fixes the issue of vt(1) leaving behind some environment variables defined (e.g. $TERM, $COLS, $LINES) after it exits. Incidentally, is there a better way to check if a program is running inside vt(1) besides checking if $TERM is defined? fhs diff -r bb188b04d462 sys/src/cmd/vt/main.c --- a/sys/src/cmd/vt/main.c Fri Dec 18 07:16:29 2020 -0800 +++ b/sys/src/cmd/vt/main.c Fri Dec 18 20:45:13 2020 -0500 @@ -298,6 +298,8 @@ break; }ARGEND; + if(rfork(RFENVG) < 0) + sysfatal("rfork: %r"); quotefmtinstall(); notify(catch); atexit(shutdown);