From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sebastian Miele Newsgroups: gmane.lisp.guile.user Subject: Re: how to kill child process? Date: Mon, 24 Aug 2020 01:08:52 +0200 Message-ID: References: <2139767403.5164633.1598212258730.ref@mail.yahoo.com> <2139767403.5164633.1598212258730@mail.yahoo.com> <87o8n1yuhy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22225"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user@gnu.org To: vapnik spaknik Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Aug 24 01:09:22 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k9z74-0005hE-Sn for guile-user@m.gmane-mx.org; Mon, 24 Aug 2020 01:09:22 +0200 Original-Received: from localhost ([::1]:41248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9z73-0004dg-Vi for guile-user@m.gmane-mx.org; Sun, 23 Aug 2020 19:09:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k9z6v-0004dI-9z for guile-user@gnu.org; Sun, 23 Aug 2020 19:09:13 -0400 Original-Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]:40489) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k9z6p-0001KQ-DI for guile-user@gnu.org; Sun, 23 Aug 2020 19:09:12 -0400 Original-Received: by mail-ej1-x634.google.com with SMTP id o18so9550275eje.7 for ; Sun, 23 Aug 2020 16:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EcmwiD0vl8NDLvrxVe3+/4l+3+ycCigogXv3Hlqs7Pw=; b=DvIU+JWlK+Kox5wADv/LzEaH18vMi2iXApGdHQaVHQb//6O1vUgo7yWs7pVoSgxUgF Luhcc30KQ0WOpU9yH/Js+xv+zCDn3k8gp57UWhT5WgFIW0jFrL5AN7BmMcq0Fq9w1T1Q XyAYnm/uijT8BQQ81gxV2gpb58XgB9c+aJT78jGrddfosKRa5i1/ErMInmGrryiD3B3v X3e/aXTVT9xx+uJF9UNH9FLnSYLj/3rheA+UPFfucOl3nBXRuvGWPOlp3lKZGxsqt8iX kAB+Gpnqe4uiF3n/hFAB8Hr1jpuyH5zSScRwy1liH2r4SQ94gR7xH+/ePqISKjN6XM8N gPsQ== 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=EcmwiD0vl8NDLvrxVe3+/4l+3+ycCigogXv3Hlqs7Pw=; b=PZfDkG1IAlC5GAnKUZ/i7qHhco9/wjX5INh6bdnowtcgL4iekQgYvm9LeVS5VtHqRq lwakB7x5kwsK1Rb9YbXhr5MRKk/Kx7C2Z+Oj15LiZoUur626wP5YJAHxLQkEbaMPYFyu +aCvE3ZjerJ8CXbN8+IqqmAitSjZQXpQor4/tmioRsNQg5+VV4j6GNXpyG1Wmpk7tp+x MBHv0qiP+h5GKtDrlx3foYGWB+EDErFZiu9CPXzRN+J3cKTIuNR0WDTqyO9fpXpkU+80 XG8CHXFoqE3NJ2JMwe+y26OL128YDE7NH6TtRcM1uNRNUIOmr79yj8N59+fubhikR5r2 qkJw== X-Gm-Message-State: AOAM53054yAGvdlob2Dru7zsV3+En1dnB8LrmjjtE+B61rXl5fjeiuxF mEwIWJLSs4xtJcASrP+iwezoDDh1/ThYwuwRubs= X-Google-Smtp-Source: ABdhPJwVB6AYDS3yysdobjqCFXqzy7OG/MKjKvq9nVPTFHdrE51Qcc5QzTd31Glxa4jc3IkGItFARGTNuRERLD3qVcY= X-Received: by 2002:a17:906:f1d4:: with SMTP id gx20mr3093724ejb.132.1598224145703; Sun, 23 Aug 2020 16:09:05 -0700 (PDT) In-Reply-To: <87o8n1yuhy.fsf@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=sebastian.miele@gmail.com; helo=mail-ej1-x634.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16828 Archived-At: Me: > vapnik spaknik writes: > > >> ssh -S ~/.ssh/%C -N -f remotehost & > >> rsync -au -e "ssh -S ~/.ssh/%C remotehost" remotehost:file1 > backupdir/file1 > >> rsync -au -e "ssh -S ~/.ssh/%C remotehost" remotehost:file2 > backupdir/file2 > > > > and finally, find the pid and kill the ssh session: > > > >> ps -e|grep ssh > >> kill > > This does not answer your exact question, but such behavior can be > acheived very automatically by putting something like the following into > ~/.ssh/config: > > ControlMaster auto > ControlPath ~/.ssh/socket/%C > ControlPersist 5 > > This automatically creates master processes. Or not, if there currently already is one, in which case that one is used. And the respective master > processes automatically terminate after 5 seconds. > After 5 seconds of being without at slave. >