Skip to main content

Questions tagged [process]

A process is an instance of a computer program that is being executed.

2 votes
1 answer
68 views

Mapping two users to host with user namespaces

I'm trying to understand whether it's possible to map two users from a user namespace to two different users on the host. The goal is to replicate the same permissions I have on my host inside a ...
Liric Ramer's user avatar
0 votes
0 answers
47 views

Why does there appear to be a discrepancy when trying to programmatically access files associated with different tasks in Linux from kernel space?

As a way to better understand Linux kernel structures, interacting with and pulling information from these (and also getting more experience coding in C), I've been building simple kernel modules to ...
genericuser99's user avatar
0 votes
1 answer
38 views

Can you use `inotify` with `/sys/fs/cgroup/pids.peak`?

I am trying to implement a program that would run as PID1 in a Podman container and would wait for the the user to podman exec into the container at least once before exiting. /sys/fs/cgroup/pids.peak ...
user11589013's user avatar
2 votes
1 answer
894 views

What do programs use to read their environment?

I'm on Fedora, where all preinstalled shells apparently support bashisms: bash --posix does, and even sh. Still, when I used this function, pathprepend () { if [[ ":$PATH:" != *":$1:...
Arch Stanton's user avatar
0 votes
1 answer
34 views

How long has a process been idle since it last ran?

I am interested in finding out the last time a process was scheduled to run. That is, how long it has been sleeping, since it last ran. When was it last active? Basically, a generalization of what the ...
Linas's user avatar
  • 205
1 vote
1 answer
45 views

Why read process doesn't show up in ps -ef

I open two terminal windows. In one, I run: $ read foo I don't press RETURN, so read is blocking. In the other terminal window, I search for the process: $ ps -ef | grep foo user 95292 94814 ...
Ruben P. Grady's user avatar
0 votes
1 answer
58 views

Writable and executable memory regions

I wrote a simple Python script to scan /proc/{pid}/maps for regions that are writable and executable on my computer. It came up with a few hits surprisingly, all private anonymous. Wondering why a ...
spinkus's user avatar
  • 490
1 vote
1 answer
115 views

What exactly does %wait in pidstat mean?

Environment Ubuntu22.04 sysstat version 12.2.0 Number of logical CPUs 16 man pidstat shows the following, but I would like to know more specifically about the denominator and numerator of %wait. ...
LAPK's user avatar
  • 11
12 votes
2 answers
1k views

How to automatically terminate shell scripts after 1 minute of no output

I need to run multiple shell scripts sequentially (s1.sh, s2.sh, s3.sh) with the following requirement: If a script produces no output (stdout or stderr) for 1 minute, it should be terminated After ...
Just a learner's user avatar
1 vote
1 answer
56 views

Hit a strange signal settings of a kernel thread in Linux

I am working on an embedded Linux system (kernel-5.10.24), and using busybox as init. Now I hit a strange problem about signal settings of a kernel thread in system. The kernel thread is from a device ...
wangt13's user avatar
  • 591
0 votes
1 answer
100 views

Understanding the concepts of commands, processes and namespaces

I am not a strong linux user, but I want to better understand the material in this post here which talks about linux namespaces https://stackoverflow.com/questions/44666700/unshare-pid-bin-bash-fork-...
learningtech's user avatar
0 votes
0 answers
57 views

Linux Server swap memory problem

I have the same problem on all servers running Java processes. I have lots of available memory. But my swap is full of Java-related pages. But the system never cleans its swap, Java pages stay there &...
Eduardo's user avatar
0 votes
0 answers
26 views

CPU affinity after process cloning

I am cloning a process using the clone() glibc wrapper function. For some unrelated reasons, I need to set the CLONE_THREAD flag bit ON. It implies that If CLONE_THREAD is set, the child is placed in ...
mEm's user avatar
  • 101
2 votes
0 answers
75 views

Why do I have 2 bash processes when I openede only one terminal session?

I am using windows WSL2, and opened just one terminal session. I used the command ps and ps a. From what I know, the bash with PID 559 is the shell I am interacting with. The question is, why do I ...
B1LLP4RK's user avatar
0 votes
1 answer
40 views

Are reads of /proc/pid/environ atomic in Linux 6.x (e.g: 6.1.99)?

When a process execs, looking at kernel code for environ_read(), it seems that if the mm_struct doesn't yet exist / is null or the env_end member of that mm_struct is null, environ_read() will return ...
Gregg Leventhal's user avatar

15 30 50 per page
1
2 3 4 5
175