Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The bug stops here.


devel / comp.lang.python / Re: Execute in a multiprocessing child dynamic code loaded by the parent process

SubjectAuthor
o Re: Execute in a multiprocessing child dynamic code loaded by theMartin Di Paola

1
Re: Execute in a multiprocessing child dynamic code loaded by the parent process

<mailman.245.1646751031.2329.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17435&group=comp.lang.python#17435

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: martinp....@gmail.com (Martin Di Paola)
Newsgroups: comp.lang.python
Subject: Re: Execute in a multiprocessing child dynamic code loaded by the
parent process
Date: Tue, 8 Mar 2022 14:50:23 +0000
Lines: 9
Message-ID: <mailman.245.1646751031.2329.python-list@python.org>
References: <20220306124208.orqbcezhqqeysdpe@gmail.com>
<25124.63881.205740.249595@ixdm.fritz.box>
<20220306204228.l5pzjzc6peytbshp@gmail.com>
<25126.19435.559817.664736@ixdm.fritz.box>
<20220308145023.vdisqxa3eb5a5jgy@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Trace: news.uni-berlin.de Kl4oSA0JNzWIz42yiUu+cQtVBy/I1QpUKvfTOSXSn6Wg==
Return-Path: <martinp.dipaola@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=jkU01Cz7;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.050
X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'modules': 0.07;
'instances': 0.09; 'executed': 0.16; 'instance': 0.16;
'subject:child': 0.16; 'subject:code': 0.16; 'subject:dynamic':
0.16; 'subject:parent': 0.16; 'subject:skip:m 10': 0.16; 'message-
id:@gmail.com': 0.18; 'to:addr:python-list': 0.20; 'first,': 0.22;
'to:name:python-list@python.org': 0.24; 'function': 0.27; 'header
:In-Reply-To:1': 0.34; 'received:google.com': 0.34;
'from:addr:gmail.com': 0.35; 'target': 0.36; 'received:209.85':
0.37; 'class': 0.37; 'this.': 0.37; 'could': 0.38; 'put': 0.38;
'received:209': 0.39; 'process.': 0.65; 'foreign': 0.67;
'process,': 0.75; 'received:209.85.161': 0.84; 'subject: \n ':
0.84; 'performs': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=date:from:to:subject:message-id:mail-followup-to:'user-agent
:references:mime-version:content-disposition:in-reply-to;
bh=76quynQIeCqfqU1Jlq79PBr/2FsSnqXdZ1JOn88Pw9U=;
b=jkU01Cz7khgNz9YIrXeiFenrrlGQZDRNxIpmcFBtxvuJ9zh5kf+AA02aNF3u+fbfp3
324Cve8SlvzGtJHMUr/hnEznYgFq9gUiXD8NtgI9XObxdHcrWxm0vtUgBBhh1wvF1vR5
OE5U0oVDmh8DfocdVNXjzis/Wg7369z4HGCJHFKLj7AltPfLHvB1TWI5rFsMhA1WUUI3
BwO+lWuJf9s2n6spzq1HHv+UbY6ftGEEOSY4va8aNJmikdoaCNwDzupU3DShWTpJQa8+
tjk3D4eSB1S8r5ISPtkpPp683n2m/1Y/wZokTcOf4aJnKcpNZuvLLohpd/JUGNPc/4fT
bkHA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to
:'user-agent:references:mime-version:content-disposition:in-reply-to;
bh=76quynQIeCqfqU1Jlq79PBr/2FsSnqXdZ1JOn88Pw9U=;
b=SucW/RzX2/3oZ6jKDsMNR5uLmNI0COJ8RByY6qKkDzXbvZGhFiI9BhUYMbOeuj6WJa
YjGT3A63ti80FFCHdspCSq9sxZFuO0r24q9F/ZFF/J21HM5cJXrn7xs8emKCRkvxkI/6
gTsBAQwZHWOy4nIoAsBxWCoMGLkGmRzBvfLT4V+k0TT0TOWMRbVGRtuJ8X7gmFTBpDN3
XLgfxitazRGY1zFEPP8ShCiL1bapWAFEz23CAKB96ahOMkrh/947W+MskpXOvX1+ty1D
wWRaK6ImWXZ39a03IalzaMD9d0rnn7sZN8xELx3oNAka2E+EHeGc609s4WxQ1xGnveqI
yyaA==
X-Gm-Message-State: AOAM532d6zcveOcMMz4QHzuJD/L9pSFMoA6CpA4VGvVF0/hV05Yzu2Xd
MH7HUgR4TxmupUf1gHALlN1lUoGfB7A=
X-Google-Smtp-Source: ABdhPJz+jN2Cz5m53y+hTulZGm+vKr8nKoy7werkf480qOTLL9GNANpSLY3n3udXXQw7vWFBMd7msQ==
X-Received: by 2002:a05:6870:b211:b0:d6:defc:ff27 with SMTP id
a17-20020a056870b21100b000d6defcff27mr2596649oam.100.1646751028071;
Tue, 08 Mar 2022 06:50:28 -0800 (PST)
Mail-Followup-To: "python-list@python.org" <python-list@python.org>
'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Thunderbird/52.5.2 Lightning/5.4.5.2'
Content-Disposition: inline
In-Reply-To: <25126.19435.559817.664736@ixdm.fritz.box>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20220308145023.vdisqxa3eb5a5jgy@gmail.com>
X-Mailman-Original-References: <20220306124208.orqbcezhqqeysdpe@gmail.com>
<25124.63881.205740.249595@ixdm.fritz.box>
<20220306204228.l5pzjzc6peytbshp@gmail.com>
<25126.19435.559817.664736@ixdm.fritz.box>
 by: Martin Di Paola - Tue, 8 Mar 2022 14:50 UTC

>Then, you must put the initialization (dynamically loading the modules)
>into the function executed in the foreign process.
>
>You could wrap the payload function into a class instances to achieve this.
>In the foreign process, you call the instance which first performs
>the initialization and then executes the payload.

That's what I have in mind: loading the modules first, and then unpickle
and call the real target function.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor