subprocess nedir dersek?
nette şöyle bir acıklama buldum.The subprocess module allows you to spawn new processes, connect to their
input/output/error pipes, and obtain their return codes. This module intends to
replace several older modules and functions.
bi de soyle bi sey buldum:
A running program is called a process. Each process has its own system state, which
includes memory, lists of open files, a program counter that keeps track of the instruction
being executed, and a call stack used to hold the local variables of functions.
Normally, a process executes statements one after the other in a single sequence of control
flow, which is sometimes called the main thread of the process. At any given time,
the program is only doing one thing.
A program can create new processes using library functions such as those found in
the os or subprocess modules such as os.fork(), subprocess.Popen(), etc.
However, these processes, known as subprocesses, run as completely independent
entities-each with their own private system state and main thread of execution.
Because a subprocess is independent, it executes concurrently with the original process.
That is, the process that created the subprocess can go on to work on other things
while the subprocess carries out its own work behind the scenes.
peki pipe nedir dersek?
Unix or Linux without pipes is unthinkable, or at least, pipelines are a very important part of
Unix and Linux applications. Small elements
are put together by using pipes. Processes are chained together by their standard streams, i.e. the
output of one process is used as the input of another process. To chain processes like this, so-called
anonomymous pipes are used.
Hiç yorum yok:
Yorum Gönder