unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Running guile single-threaded?
@ 2020-05-17 15:27 Caleb Ristvedt
  2020-05-17 15:39 ` Matt Wette
  0 siblings, 1 reply; 4+ messages in thread
From: Caleb Ristvedt @ 2020-05-17 15:27 UTC (permalink / raw)
  To: guile-user

I'm trying to use unshare() with the CLONE_NEWUSER flag, but this
requires that the process be single-threaded (otherwise I always get
EINVAL). /proc/<guile-pid>/task has 6 entries when I launch guile, 5
after disabling automatic finalization. I can't seem to find a way to
get that down to 1. Is this feasible?

- reepca



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Running guile single-threaded?
  2020-05-17 15:27 Running guile single-threaded? Caleb Ristvedt
@ 2020-05-17 15:39 ` Matt Wette
  2020-05-17 16:58   ` Caleb Ristvedt
  2020-05-30 21:27   ` Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Matt Wette @ 2020-05-17 15:39 UTC (permalink / raw)
  To: guile-user

On 5/17/20 8:27 AM, Caleb Ristvedt wrote:
> I'm trying to use unshare() with the CLONE_NEWUSER flag, but this
> requires that the process be single-threaded (otherwise I always get
> EINVAL). /proc/<guile-pid>/task has 6 entries when I launch guile, 5
> after disabling automatic finalization. I can't seem to find a way to
> get that down to 1. Is this feasible?
>
> - reepca
>

I don't this is possible without building guile using --without-threads
argument to configure.  Otherwise, the mutl-threaded gc is included.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Running guile single-threaded?
  2020-05-17 15:39 ` Matt Wette
@ 2020-05-17 16:58   ` Caleb Ristvedt
  2020-05-30 21:27   ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Caleb Ristvedt @ 2020-05-17 16:58 UTC (permalink / raw)
  To: Matt Wette; +Cc: guile-user

> I don't this is possible without building guile using --without-threads
> argument to configure. Otherwise, the mutl-threaded gc is included.

Good to know, thanks. I'll have to figure out a way to use clone+exec
safely, then (calling process is multi-threaded), probably by writing an
extension in C.

- reepca



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Running guile single-threaded?
  2020-05-17 15:39 ` Matt Wette
  2020-05-17 16:58   ` Caleb Ristvedt
@ 2020-05-30 21:27   ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2020-05-30 21:27 UTC (permalink / raw)
  To: guile-user

Hi,

Matt Wette <matt.wette@gmail.com> skribis:

> On 5/17/20 8:27 AM, Caleb Ristvedt wrote:
>> I'm trying to use unshare() with the CLONE_NEWUSER flag, but this
>> requires that the process be single-threaded (otherwise I always get
>> EINVAL). /proc/<guile-pid>/task has 6 entries when I launch guile, 5
>> after disabling automatic finalization. I can't seem to find a way to
>> get that down to 1. Is this feasible?
>>
>> - reepca
>>
>
> I don't this is possible without building guile using --without-threads
> argument to configure.  Otherwise, the mutl-threaded gc is included.

Yeah, there’s the GC marker threads, the finalization thread, and the
signal thread (started on the first call to the ‘sigaction’ procedure).
It’s crowded there.

It wonder if Guile should offer a documented way to stop the
finalization thread (as with ‘scm_set_automatic_finalization_enabled’,
but from Scheme) and the signal thread.

Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-30 21:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-17 15:27 Running guile single-threaded? Caleb Ristvedt
2020-05-17 15:39 ` Matt Wette
2020-05-17 16:58   ` Caleb Ristvedt
2020-05-30 21:27   ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).