Tag Info

New answers tagged

15

Yes. The kernel will release all the resources allocated by a program upon the program's termination. This is done after the do_exit() function defined in kernel/exit.c has terminated its execution; the do_exit() function execution itself might be triggered by a number of events, most commonly due to an explicit exit() syscall called by the program during ...


2

If you want to install the C-based CS50 fork of the Stanford Portable Library, you can install it by running these commands in a terminal (Ctrl+Alt+T): # Install build dependencies and set up /usr/local/src for administrators. sudo apt-get update && sudo apt-get install build-essential openjdk-7-jdk git cd /usr/local/src && sudo chgrp sudo . ...


6

To kill a process on a port you can do: $ fuser -n tcp -k 443 && /opt/lampp/xampp start Change the && to ; if you want it to start xampp no matter if there was anything running on that port or not.


5

Using C (note that main() usually returns an int): #include <stdio.h> #include <stdlib.h> int main() { int ret; ret=system("fuser -k 443/tcp; /opt/lampp/xampp start"); return ret; } Or simply using bash: fuser -k 443/tcp; /opt/lampp/xampp start Using ; in place of && in either methods makes /opt/lampp/xampp start ...



Top 50 recent answers are included