About process control

Process control Create process fork //Create child process pid_t fork(void); //Success: the parent process returns the PID of the child process, and the child process returns 0; Failure: Return - 1, set errno value The parent-child process who preempts the CPU time slice will execute first Global variables cannot be shared between p ...

Posted by kapishi on Wed, 24 Nov 2021 11:54:04 -0800

Detailed explanation of linux tput command

1. Introduction The tput command initializes and operates your terminal session through the terminfo database. Using tput, you can change several terminal functions, such as moving or changing the cursor, changing text properties, and clearing specific areas of the terminal screen. Like most commands in UNIX, the tput command can be used ...

Posted by ultk on Thu, 18 Nov 2021 07:47:10 -0800

unix commands often used in work

1, Background          I have accumulated a lot of commands related to the server in my work, which are commonly used. Record and share them with you. I hope it will be helpful. 2, Common commands 1. vim enters the file, exits the editing mode, executes DD to delete a whole line, and 20dd to delete 20 ...

Posted by wisewood on Wed, 03 Nov 2021 12:14:16 -0700

Linux Process Management

Process and thread definition A process is a program in execution (the object code is stored on the media). A process includes not only the running program, but also some other resources, such as open files, suspended signals, internal kernel data, processor status, etc. An execution thread is projected in a section of memory, which also c ...

Posted by Scorptique on Tue, 02 Nov 2021 13:15:11 -0700

Linux command artifact: lsof

lsof is system management/ security Uber tools. Call this tool lsof a real name, because it means "lists open files". One thing to remember is that in Unix, everything (including network sockets) is a file. Interestingly, lsof is also one of the Linux/Unix commands with the most switches. It has so many switches, and it has many opti ...

Posted by joesaddigh on Thu, 28 Oct 2021 21:29:15 -0700

mit6.s081 lab1 Xv6 and Unix utilities

chapter 1 system call 1.1 Process and memory int fork() Create a process, the parent process returns the pid of the child process, and the child process returns 0int wait(int *status) Status gets the status returned by the child process exit, and the return value of wait is the pid of the child process exit. If the process calling wait() has ...

Posted by james_creasy on Sat, 02 Oct 2021 13:15:28 -0700

File IO programming under Linux

Linux system call refers to a set of "special interfaces" provided by the operating system to user programs through which user programs can obtain special services provided by the operating system. To better protect kernel space, programs are divided into kernel space and user space, which ru ...

Posted by locomotive on Tue, 16 Jun 2020 18:34:54 -0700

cmake basic introduction (1)

cmake basic introduction (1) Official help documents CMake is a cross platform make. CMakeLists.txt The brief introduction is as follows: # Auto CMakeLists.txt: frame with cppunit use for lintcode/leetcode # minimum cmake version cmake_minimum_required(VERSION 3.7) # cmake minimum version ...

Posted by Cyberspace on Sun, 07 Jun 2020 00:39:06 -0700

Deployment and application of puppet

brief introduction Puppet is a centralized configuration management system for Linux, Unix and windows platforms. It uses its own puppet description language to manage configuration files, users, cron tasks, software packages, system services, etc. These system entities are called resources by puppet. The design goal of puppet is to simplify t ...

Posted by nareshrevoori on Fri, 05 Jun 2020 03:36:06 -0700

pthread realizes multithreaded program under Linux (one thread controls the pause, resume and termination of two threads)

1, Functional requirements Three threads are used. Thread 1 is used to listen to user input and as listener of other two threads. The main content of thread 2 is to output "hello 2" string every other period of time. Thread 3 is used to output "hello 3" string every other period ...

Posted by iamali on Thu, 04 Jun 2020 19:53:07 -0700