Skip to content

Instantly share code, notes, and snippets.

View edgarcosta's full-sized avatar

Edgar Costa edgarcosta

View GitHub Profile
execve("/usr/bin/python3", ["python3", "/dev/null"], 0x7ffdc5777ff8 /* 31 vars */) = 0
brk(NULL) = 0x1a2a000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd19b2f1a0) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=61470, ...}) = 0
mmap(NULL, 61470, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f274c0a3000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300A\2\0\0\0\0\0"..., 832) = 832
execve("/usr/bin/python3", ["python3", "/dev/null"], 0x7ffdc5777ff8 /* 31 vars */) = 0
brk(NULL) = 0x1a2a000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd19b2f1a0) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=61470, ...}) = 0
mmap(NULL, 61470, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f274c0a3000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300A\2\0\0\0\0\0"..., 832) = 832
execve("/usr/bin/python3", ["python3", "/dev/null"], 0x7ffdc5777ff8 /* 31 vars */) = 0
brk(NULL) = 0x1a2a000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd19b2f1a0) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=61470, ...}) = 0
mmap(NULL, 61470, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f274c0a3000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300A\2\0\0\0\0\0"..., 832) = 832
execve("/usr/bin/python3", ["python3", "/dev/null"], 0x7ffdc5777ff8 /* 31 vars */) = 0
brk(NULL) = 0x1a2a000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd19b2f1a0) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=61470, ...}) = 0
mmap(NULL, 61470, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f274c0a3000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300A\2\0\0\0\0\0"..., 832) = 832
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Sage configure 10.4.beta6, which was
generated by GNU Autoconf 2.72. Invocation command line was
$ ./configure --with-system-givaro=no --no-create --no-recursion
## --------- ##
## Platform. ##
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Sage configure 10.4.beta6, which was
generated by GNU Autoconf 2.72. Invocation command line was
$ ./configure --with-system-givaro=no --no-create --no-recursion
## --------- ##
## Platform. ##
function MultiFork(n)
res := [];
for i in [1..n] do
if #res eq i - 1 then // only the parent gets inside of this loop
f := Fork();
if f ne 0 then // parent branch
Append(~res, f);
else
return [], i; // child branch
end if;
function MultiFork(n)
res := [];
for i in [1..n] do
if #res eq i - 1 then
f := Fork();
if f ne 0 then
Append(~res, f);
else
return [], i;
end if;
function MultiFork(n)
res := [];
for i in [1..n] do
if #res eq i - 1 then
f := Fork();
if f ne 0 then
Append(~res, f);
else
return [], i;
end if;
function MultiFork(n)
parentpid := Getpid();
IsParentProcess := func<|parentpid eq Getpid()>;
res := [];
for i in [1..n] do
if IsParentProcess() then
Append(~res, Fork());
if not IsParentProcess() then
return [], i;
end if;