logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Mojo::IOLoop::ReadWriteProcess::Namespace - Namespace object for Mojo::IOLoop::ReadWriteProcess.

Author

       Ettore Di Giacinto <edigiacinto@suse.com>

perl v5.40.1                                       2025-08-10              Mojo::IOLoop::...cess::Namespace(3pm)

License

       Copyright (C) Ettore Di Giacinto.

       This library is free software; you can redistribute it and/or modify it under the same terms as Perl
       itself.

Methods

       Mojo::IOLoop::ReadWriteProcess::Namespace inherits all methods from Mojo::Base and implements the
       following new ones.

   unshare
           use Mojo::IOLoop::ReadWriteProcess::Namespace qw(CLONE_ALL);
           my $ns = Mojo::IOLoop::ReadWriteProcess::Namespace->new();
           $ns->unshare(CLONE_ALL);

       Wrapper around the unshare syscall, accepts the same arguments, constants can be exported from
       Mojo::IOLoop::ReadWriteProcess::Namespace.

   mount
           my $ns = Mojo::IOLoop::ReadWriteProcess::Namespace->new();
           $ns->mount("proc", "/proc", "proc");

       Wrapper around the mount syscall, accepts the same arguments.

   isolate
           my $ns = Mojo::IOLoop::ReadWriteProcess::Namespace->new();
           $ns->isolate();

       Mount appropriately /proc to achieve process isolation during process containment, see
       Mojo::IOLoop::ReadWriteProcess::Container.

Name

       Mojo::IOLoop::ReadWriteProcess::Namespace - Namespace object for Mojo::IOLoop::ReadWriteProcess.

Synopsis

           use Mojo::IOLoop::ReadWriteProcess::Namespace qw(CLONE_ALL);

           my $ns = Mojo::IOLoop::ReadWriteProcess::Namespace->new();

           $ns->unshare(CLONE_ALL);
           $ns->mount("proc", "/proc", "proc");
           $ns->isolate();

See Also