process

FUSE filesystems look at saved UID/GID?

FUSE filesystems look at saved UID/GID? While attempting to create a program that reads some configuration before launching programs as a normal user and then as the root user, I noticed this odd behavior. I can’t seem to find mention of it anywhere else. Normal filesystems use the effective UID/GID for access checks, but it …

Total answers: 1

How to create child process to init? (process with PPID 1)

How to create child process to init? (process with PPID 1) I’m currently exploring process management on Linux systems and came across an interesting question: How can one create a child process directly linked to the init process, which typically has a PPID (Parent Process ID) of 1? Asked By: gsagagsa || Source There are …

Total answers: 1

Run Additional Commands on a Specific PID

Run Additional Commands on a Specific PID I’m completely new with Linux so forgive me if this seems like an absurd question. I am trying to open new tabs on Firefox without a url from the terminal. So my command is: $ firefox -new-tab -search foo1 Now when I try to do it again in …

Total answers: 1

How to pass a parameter to a command that's being executed by exec in bash?

How to pass a parameter to a command that's being executed by exec in bash? I’m trying to start a subprocess with a unique process name from a bash script. This works: bash -c "exec -a MyUniqueProcessName ‘./start_service’ &" but my problem is that I want to pass a parameter to start_service. If I do …

Total answers: 1

start multiple terminal windows in a "process group" so that remaining processes can be killed, if any one of the processes terminates

start multiple terminal windows in a "process group" so that remaining processes can be killed, if any one of the processes terminates I have a script which starts 3 terminal emulator windows: #!/bin/sh terminator –role=’terminator-left’ 2>/dev/null & sleep 0.1 terminator –role=’terminator-center’ 2>/dev/null & sleep 0.1 terminator –role=’terminator-right’ 2>/dev/null & (I am using the –role option, …

Total answers: 3

How to get PID of last process run from bash script?

How to get PID of last process run from bash script? I am trying to get the process ID of the last executed command from within a bash script. Normally I would do: $ nohup ./test > nhout & nohup: redirecting stderr to stdout $ echo $! 3006196 #This is the PID I am trying …

Total answers: 1

System calls involved in stack and heap allocation

System calls involved in stack and heap allocation In the process address space, there is the stack and the heap. When a function is called, or even when a local variable is declared, it uses the stack; the kernel must assign physical address and create the mapping of virtual to physical address; so, a system …

Total answers: 2

How to make command `id` print different real and effective UID in Ubuntu

How to make command `id` print different real and effective UID in Ubuntu The info page of command id states that it will output the effective user ID if different from the real user ID. I have been trying to achieve that somehow, running the command with the Bash shell as my normal (unprivileged) user, …

Total answers: 2

Manage the dotnet process; detach, reattach and view output

Manage the dotnet process; detach, reattach and view output On my Ubuntu Server I run the command dotnet myapplication.dll to start an application. It subsequently displays a steady stream of output logging to the screen. I would like to be able to perform this action, disconnect from the process, perform some other tasks, and then …

Total answers: 1

How to list process with their depth?

How to list process with their depth? I have a slightly different process tree question. I need to list the process and their depth in scalar value. pstree gives the result in a "graphic" manner. root 100930 0.0 0.3 839396 49020 ? Ssl Aug15 38:20 /usr/sbin/rsyslogd -n root 847414 0.0 0.0 76640 7788 ? Ss …

Total answers: 1

Why does Linux needs both pid_max and threads-max?

Why does Linux needs both pid_max and threads-max? I understand the difference between /proc/sys/kernel/pid_max and /proc/sys/kernel/threads-max. There’s a good explanation at the answer to Understanding the differences between pid_max, ulimit -u and thread_max: /proc/sys/kernel/pid_max has nothing to do with the maximum number of processes that can be run at any given time. It is, in …

Total answers: 1

How could we get the USS of a process

How could we get the USS of a process As far as I know there are several memory concepts: VSS RSS PSS and USS, in which USS(unique set size) is the physical memory exclusively used by a process(correct me if needed). I think this should be a very useful value to let me know which …

Total answers: 1

Why the process still can be listed after killing them?

Why the process still can be listed after killing them? List all process running vlc: debian@debian:~$ ps aux |grep vl[c] debian 14482 0.1 2.2 2882968 136428 ? Sl 10:19 0:02 vlc -I telnet –telnet-host 192.168.31.167 –telnet-port 4212 –telnet-password admin debian 15174 0.2 2.4 2881576 145368 ? Ssl 10:32 0:03 vlc -d -I telnet –telnet-host 192.168.31.167 …

Total answers: 1

What's the difference between "-dm" and "-Dm" in GNU Screen?

What's the difference between "-dm" and "-Dm" in GNU Screen? The GNU Screen manual says: `-d -m’ Start `screen’ in _detached mode. This creates a new session but doesn’t attach to it. This is useful for system startup scripts. `-D -m’ This also starts `screen’ in _detached_ mode, but doesn’t fork a new process. The …

Total answers: 1

Running a function as process with a set process name or id

Running a function as process with a set process name or id I have a bash script set up to monitor a number of UDP streams and convert it into actionable data. My problem is that I need to set the script to periodically check to see if the stream capture is running and restart …

Total answers: 1

How to write a process that restart again every time that it's killed

How to write a process that restart again every time that it's killed I want the exact opposite of this question. I want to know how I can create a process that keeps restarting if it’s killed. Could someone give me an implementation example? For instance, let’s assume that I have a simple process that …

Total answers: 2

pstree does not show every process

pstree does not show every process I opened a terminal made sudo su run the nano editor in the background by running it as nano&. I tried to find the newly started nano process in the process list. To do that, I typed ps aux|grep -i nano -> Saw the newly created nano but when …

Total answers: 2

check is Process is Alive from PID while handling recycled PID

check is Process is Alive from PID while handling recycled PID From what I seen online you call kill method in c++ in order to see if the process is alive. the issue with that is PID’s get rycled and the same PID your looking for may not be the same process. I have a …

Total answers: 2