The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [process]

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

290 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
232 views

Is it possible to make an exec call that “returns”?

Is there a way to make the exec system call work like a function call that returns instead of totally replacing the current process image? My motivation is trying to integrate two shells with ...
5
votes
0answers
1k views

Strange cpu usage values reported by pidstat

I have a script that reports the cpu usage of a specific program reading values from pidstat. The script launches as: pidstat -C ^frontend$ -h -l -p ALL 1 1 The values reported this way sometimes ...
5
votes
1answer
937 views

Why nautilus in background takes so much IO and CPU when login, and how to resolve that, or is that a bug?

I'm using Arch Linux for some time. I find nautilus will be running automatically when I login because it's used for handling desktop's behavior. If I kill it, then trash icon and all other file's ...
4
votes
0answers
101 views

For a process, what are the differences between a controlling terminal and non-controlling terminal?

For a process, what are the differences between a controlling terminal and non-controlling terminal? If a process calls open() on a terminal's device file, will the terminal become the controlling ...
4
votes
1answer
580 views

Apart from USR1 and USR2, which signals can I safely use for custom interrupting behavior? (in python)

I have a complex application with USR1 and USR2 already defined as having a well-defined and not replaceable purpose. There are tons of different signals in linux. Might there be another one (maybe a ...
4
votes
1answer
504 views

why is CAP_SYS_ADMIN needed for CLONE_NEWPID?

man 2 unshare tells us Use of CLONE_NEWPID requires the CAP_SYS_ADMIN capability and the suggested reading for further information man 7 pid_namespaces does not really discuss the presumable risk ...
4
votes
0answers
127 views

Disable networking only inside of a single terminal

I want to run a command in the terminal to disable networking, just in that terminal. How can that be accomplished? I'm running OSX. Note: I only want to disable the networking in that terminal. ...
4
votes
1answer
87 views

Parent restarted by child doesn't respond to CTRL-C

I wrote a program. It starts a process (call it A) that spawns a child process (call it D) that shutdowns and restarts A. Problem is, now I can't kill A nicely from the terminal (ie. CTRL-C isn't ...
4
votes
1answer
469 views

How to open the gnome-terminal within the gnome-terminal without disowning

If I open the gnome-terminal within the gnome-terminal, the newly created terminal automatically gets disowned from the parent. Some other applications do not. How to simulate that behavior? How to ...
3
votes
0answers
127 views

Hiding processes on Unix/Linux

I found an interesting article about how to hide specific processes on linux from process monitoring tools like ps, top, lsof, ... Person states that there are several possible ways to hide processes:...
3
votes
0answers
86 views

Make one program use a special resolv.conf

I want to cheat a program to use a special /etc/resolv.conf file, that in turn will force it to use a nonstandard nameserver. The obvious solution is to recreate the whole filesystem except one file ...
3
votes
0answers
225 views

Perf Tool monitoring by PID

I'm using linux perf tool to monitor the performance of some processes. The documentation tells that you can flag it to collect profiles on per-thread, per-process and per-cpu basis. I get that the ...
3
votes
1answer
226 views

How can I show the full process name in iotop?

I am using iotop to see which processes are reading from the disk. The process name column is small and some of the names are truncated: gvfsd-tra~ec_spaw/1 gnome-sof~n-service gnome-key~1,secrets ...
3
votes
0answers
231 views

Why doesn't the Gnome System Monitor show all memory usage?

In the Gnome System Monitor, it doesn't show my virtualbox process, which is running a VM using 4GB (out of 16GB) !! I even sorted the processes by memory size. But in htop, everything seems correct. ...
3
votes
0answers
681 views

Write to stdin of running process on occasion

From time to time I want to send some text to the input of netcat. Netcat will send it then to another netcat process (either on my machine or a local network), but now I am only concerned with the ...
3
votes
0answers
138 views

Unix OSX invisible process, how do I identify further information?

Using execsnoop -v, I note a dtrace error for two processes. ID3 (ID 630) and ID2 (ID 360). ~ 03:59 am ∆:ps -p 260 PID TTY TIME CMD 260 ?? 0:02.36 /usr/libexec/UserEventAgent (Aqua) ...
3
votes
0answers
2k views

Find the cause of a permanently-blocked I/O (process in uninterruptible sleep)

Under Linux, I have a process that is blocked in uninterruptible sleep (state D). How can I investigate what's causing this? I am running an “ordinary” kernel (a Debian build), without any special ...
3
votes
0answers
438 views

Theoric: How to kill a forever forking process?

Let's say you have a process that forks every time it has the chance. It launches itself in niceness -20, so it forks faster than you can kill it. Also, it remembers its childrens and it parents, so ...
3
votes
1answer
762 views

How to tell whether a process is network I/O intensive or not in user mode in Linux?

I am currently writing a program in Linux which needs to tell whether a specific process is network I/O intensive or not at runtime. I have tried some tools such as iotop and iftop, but none of them ...
3
votes
1answer
643 views

Ubuntu: Process vfs-worker taking all CPU resources

My Cloud9 (Ubuntu-based cloud IDE) began to be unresponsive after I tried to save some files (they didn't save to my cloud workspace). It shows 100% CPU utilization and a process that takes all CPU ...
3
votes
0answers
78 views

Find which process is being joined by another?

If I have opened Nautilus and spawned a new Nautilus instance, a new PID is created for the new Nautilus instance. Shortly after, the instance is joined with the main Nautilus program running. Main ...
3
votes
0answers
54 views

Identify process

Every couple of minutes my Mac OSX machine starts running a process that consumes 10% of the CPU. It runs for a couple of seconds and then stops. I can see the process coming up in 'Top', but the name ...
3
votes
0answers
880 views

Monitor the creation of new processes

I want to get a notification whenever a new process is created. I've tried to use inotify on /proc, but it didn't report any event even though a new directory appeared in /proc. I could list the /...
3
votes
1answer
593 views

Configure job to expire

I'm learning Linux at the moment and were doing some exercises scheduling jobs with cron and crontab, but I'm wondering if it's possible to limit the amount of times that the scheduled job is ran. ...
3
votes
0answers
333 views

Kill a whole process tree regardless different GIDs

I am having issues with process control using the signals available to the process abstraction. In the example below you can see there is a perl script which is the parent of the whole tree with a ...
3
votes
0answers
224 views

Cgroups - memory subsystem

I want to set the memory.limit_in_bytes parameter for a control group and disable OOM, so processes freeze when the limit is reached. That said, I want to change that limit dynamically based on ...
3
votes
0answers
975 views

gnome-terminal cmd leaving processes open after closing parent window

The following simple command should demonstrate my issue: gnome-terminal --tab -t "Tab 1" -e "/bin/bash" --tab -t "Tab 2" -e "/bin/bash" This should open a new window with two tabs and an active ...
3
votes
0answers
273 views

Can I get WCHAN from ps on Mac OS X 10.7.4?

From the manual it seems that ps -AO wchan should tell me what everything is sleeping on, but everything comes up as -. (And nwchan as 0). Did they do away with the old sleep()/tsleep() interface in ...
3
votes
0answers
272 views

How to find current chroot jail path on Linux <2.6.26

While running kernel 2.6.26 or newer it's possible to get the path of the current chroot jail by comparing the mountinfo of the current process and the init process. Is there a way to get the same ...
3
votes
3answers
3k views

How to wait for all spawned and backgrounded processes to finish in bash script

I've looked and looked and can't find a working solution to a bash script I'm trying to create to shut a process down and wait for it and spawned processes to finish. I'm still learning a lot of Linux....
2
votes
1answer
60 views

How does the kernel assign the nice value to a process after it has been executed?

The Linux kernel implements two separate priority ranges. The first is the nice value, a number from –20 to +19 with a default of 0. Nice values are the standard priority range used in all Unix ...
2
votes
2answers
50 views

Stopped process vs running service?

I stopped httpd processes on a centos 7.6 machine using kill -STOP command and the processes show up as stopped in top output. I tried to telnet the webserver's IP on port 80 and was able to do so ...
2
votes
0answers
38 views

How a 95% full /home partition slows down processes?

I experienced a slowdown of some processes on my CentOS box. They did not use too much cpu cycles according to top. The only thing I have seen unusual was that my /home partition was 95% full. Could ...
2
votes
0answers
75 views

Legitimate reasons for a program to intercept, internally handle and ignore SIGINT signal

We know that - aside from SIGKILL and SIGSTOP - a program can intercept IPC signals, and run its internal handler circumventing the operation of the default handler. I can think of at least one very ...
2
votes
0answers
101 views

How to get a PID/name/path of a process that sends a network packet?

We have an application that sends some data over the TCP/IP network. We don't know which process that would be, but we want to target it. All we know is the following nftables log: kernel: * OUTPUT * ...
2
votes
2answers
376 views

Run commands in parallel, but kill both if parent is killed?

Is there any way to run two commands in parallel in Bash such that, if the shell is killed forcefully, then both of the commands are guaranteed to be also killed? A simple & won't work because if ...
2
votes
0answers
63 views

Why can't I send a post request to my server after SSH logout?

I've created a .jar file which listens on port 8089 and receives post requests. I start it in the background on my linux machine with the following commands: nohup java -jar myServer.jar & [1] ...
2
votes
0answers
143 views

Remove inactive SSH process (on server) after connection dropped (on client)

I'm using the following command on a client for port tunneling: autossh -M 20000 -4 -N -f -R 18822:localhost:22 <user>@<vps-ip> Sometimes the client would lose connection or power for a ...
2
votes
0answers
83 views

Difference between closing terminal and closing shell on child processes

Opening a new terminal and typing the command firefox& inside, ps -l gives : 4 R 1000 23132 23104 99 80 0 - 2177945 - pts/27 00:00:07 firefox If the shell is closed with the command ...
2
votes
1answer
52 views

Identify ancestor/descendant involving daemonized processes

Is there a way to identify ancestor/descendant processes that's robust in that it works through daemonization? Consider this example: PID 123 forks into PID 124 PID 124 calls setsid PID 124 forks ...
2
votes
1answer
165 views

Change tmux status bar if process is running

I was wondering if it's possible to change text in the tmux status bar (or BASH shell prompt as an alternative) if a specific process is running. I would specifically like an indicator to appear if ...
2
votes
1answer
310 views

Why is ps -u command not working?

When I use the 'top' command I get 10366 mithus 25 0 11120 1044 884 R 99.9 0.0 67:14.35 gm when I start a process using nohup ./gm &. showing that a process 'gm' is running. ...
2
votes
0answers
599 views

How does Linux CFS schedule processes vs threads fairly in 2018 4.9 kernels?

The Linux scheduler keeps evolving: How does the kernel schedule processes vs threads today? Do I need autogroups? The previous similiar stack overflow question is many years old and likely obsolete. ...
2
votes
0answers
33 views

May a process be assigned to another CPU before terminated?

I'm trying to monitor the action of CPU, and I've found something interesting. First I have a script named task.sh as below: #!/bin/sh for i in {1..999}; do sleep 2 echo $$ Then I execute ....
2
votes
0answers
312 views

How to make strace keep following children after the death of the father/mother:))?

I use this command to trace all the things that are done or started from a shell. sudo strace -e trace=memory -o outm -ff -p <the pid of the terminal instance I want to trace> -f But the ...
2
votes
1answer
350 views

How to safely quit logcheck which is taking up 75% of my CPU for hours?

logcheck has had grep running for a couple hours now and it's still not finished. How can I find out why it's taking that long and how can I gracefully quit it (so that it won't skip any logs but ...
2
votes
0answers
187 views

Can I see finger's user name in htop?

top/htop show userids. On our shared HPC, these are cryptic. I then need to manually do finger <username> to figure out who the user is. Is there a way of getting top or htop to include this ...
2
votes
0answers
574 views

Killing processes in interruptible sleep state?

I'm inserting data from Server A, which is running a Node.js app, into a MySQL database on Server B. I first check for duplicate rows, and then INSERT or not depending on the result. This process can ...
2
votes
0answers
51 views

Is there a way to give different permissions to different processes that are called from the same user?

I want to be able to have a r,w,x type permission given to specific processes and not to users. Any document I find shows that processes get the same permissions as the user calling it, but I want ...
2
votes
0answers
115 views

Dissable pid-namespace init process signal handler restriction

Ubuntu 16.04 / Linux version 4.4.0-47-generic / gcc version 5.4.0 I want to implement a container using linux cgroups and part of the implementation was to run the process into a new pid-namespace. ...