X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679430457; h=mime-version:message-id:in-reply-to:date:subject:to:user-agent :references:from:from:to:cc:subject:date:message-id:reply-to; bh=C+2yPF6l4LwM5r6hvS4plvTrekitcrQbcAqJMYmk2FY=; b=D5ArFlLKoyXK65L2UrxBSDK0vMKJ748mqEEWcXX15b/4/6oSl+dyiW2iFhHUZEZ8is psEeRbPPD8sKIl9BFUWtGh/wKDZ91uCNgX1zcYfyPIRfxZXUukgx4mzMfiQRNkA2Vmkw eej9HzwVoK93FEdQnTMdIubhAqmXYqOLxGZaPPfODGSWW6aVw0kwcO01XKZZspaaYCYU ZHuGj6VCw5GwE1qT/50IvqY1E19moiZ32haX5/XZfC4MiqB3+TNGvI5oZE8Z4f2gUz6C Cs17GuGU4n9ytl/0EbS3B2QE2ZpWBlPMOcIAhJx0Pt793jlAFqUgaKkmH/27BlvmJ6jJ cvbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679430457; h=mime-version:message-id:in-reply-to:date:subject:to:user-agent :references:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=C+2yPF6l4LwM5r6hvS4plvTrekitcrQbcAqJMYmk2FY=; b=qJVlxwwjcpUMJm5MmWW2ydlIS9FnQ5TBc/qPQp6g5pXT/0UP/D07n/GuJy8+QL/X9r xwnwL3YMv7RVjolYYW+GX0N3kadaAITX48+ZqFgOPrU32VPMTvAa9ex3JENGKwG4W5WJ P9kU7yS0dwGZ6seXrth+cdb4ckTlNy0VO/w6HVSJmHgNd1ThyULU7htXDJzVm/WtHPFj f5XmbIHaSe0T3Y5E10q10tI9x/qzSZpCAqBUIAog26VRPD03q67zIflW4EgVjztA821W RSQ9tUHmqymPBIx5icn3n/DVqVgZC03RKyzIIXyNppaeCkRPgOApx7Z1swaUnkMC4oo/ vDfQ== X-Gm-Message-State: AO0yUKX3D/UhPS18ylcP7WEpLAyloTj6jEWoSBGjARbxyAJH/894jK83 MGBwaU6y+tc0qcJGh9jrvqswt5KlS9E= X-Google-Smtp-Source: AK7set/hkE0nCNtGaFD9fCe4X+oEQW8gVDxPMQjiMmemAsvYVJn+4LO3cIA3F0I+nN6x9fX20m/4/g== X-Received: by 2002:ac2:430e:0:b0:4df:b32b:a2a3 with SMTP id l14-20020ac2430e000000b004dfb32ba2a3mr1301730lfh.47.1679430457174; Tue, 21 Mar 2023 13:27:37 -0700 (PDT) From: "vzh (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" X-Google-Original-From: vzh References: <20230319120048 DOT BB4DF85F61DF AT turkos DOT aspodata DOT se> User-agent: mu4e 1.8.11; emacs 28.2 To: geda-user AT delorie DOT com Subject: Re: [geda-user] lepton-sch2pcb ignores ^C Date: Tue, 21 Mar 2023 22:56:26 +0300 In-reply-to: <20230319120048.BB4DF85F61DF@turkos.aspodata.se> Message-ID: <87y1npx32g.fsf@lepton.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk "karl AT aspodata DOT se [via geda-user AT delorie DOT com]" writes: > It cannot be aborted with a ^C: > > $ lepton-sch2pcb styrkort.sch > Unknown config key: "." > Unknown config key: "/home/karl/git/openhw/share/pcb/" > Unknown config key: "/usr/share/pcb/pcblib-newlib/" > Could not find module (backend pcbpins). > Fall back to looking up for legacy backend "pcbpins". > ^CCould not find module (backend PCB). > Fall back to looking up for legacy backend "PCB". > > and continues as if I havn't pressed control-C. The issue is a little bit more hard that it seems to look like and several high level languages have it. I've found related thread here: https://news.ycombinator.com/item?id=32354581 As it stands out, there are several issues in lepton case. - There is no handler to handle the SIGINT signal from terminal. - Unless compiled with some dedicated flags, Guile uses several threads to run a program. - lepton-sch2pcb and its predecessor forks and executes side processes to get netlists. Solving the former one is as easy as adding the following code somewhere after all function definitions in lepton-sch2pcb: (sigaction SIGINT (lambda (sig) (primitive-exit 0))) Even if we solve it, the two latter will get in the way, so it only partly solves the problem. Multithreading and forking external processes complicate everything. I don't now a right solution yet though there are several directions in which we develop Lepton that can mitigate if not completely solve the issue in future: - Wholly rewrite lepton-sch2pcb in Scheme. - Replace functions that run lepton-netlist as an external process with direct calls to functions defined in its Scheme modules. That in turn requires transforming the backends lepton-sch2pcb uses into "module backends" (Scheme modules). - Get rid of Scheme-in-C functions living for long in our C libraries. Regards, Vladimir