<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="et">
	<id>http://courses.cs.taltech.ee/w/index.php?action=history&amp;feed=atom&amp;title=Processes_%28ITS8020%29</id>
	<title>Processes (ITS8020) - Redigeerimiste ajalugu</title>
	<link rel="self" type="application/atom+xml" href="http://courses.cs.taltech.ee/w/index.php?action=history&amp;feed=atom&amp;title=Processes_%28ITS8020%29"/>
	<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=Processes_(ITS8020)&amp;action=history"/>
	<updated>2026-05-21T22:56:51Z</updated>
	<subtitle>Selle lehekülje redigeerimiste ajalugu</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>http://courses.cs.taltech.ee/w/index.php?title=Processes_(ITS8020)&amp;diff=7456&amp;oldid=prev</id>
		<title>Irve: Uus lehekülg: &#039;{{its8020}} &#039;&#039;We look at ways to execute a program&#039;&#039;  The goal of the lab is to use three different programs to see how to execute programs. It&#039;s really simple this time.  == Tas...&#039;</title>
		<link rel="alternate" type="text/html" href="http://courses.cs.taltech.ee/w/index.php?title=Processes_(ITS8020)&amp;diff=7456&amp;oldid=prev"/>
		<updated>2018-10-19T08:40:26Z</updated>

		<summary type="html">&lt;p&gt;Uus lehekülg: &amp;#039;{{its8020}} &amp;#039;&amp;#039;We look at ways to execute a program&amp;#039;&amp;#039;  The goal of the lab is to use three different programs to see how to execute programs. It&amp;#039;s really simple this time.  == Tas...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Uus lehekülg&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{its8020}}&lt;br /&gt;
&amp;#039;&amp;#039;We look at ways to execute a program&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The goal of the lab is to use three different programs to see how to execute programs. It&amp;#039;s really simple this time.&lt;br /&gt;
&lt;br /&gt;
== Task ==&lt;br /&gt;
&lt;br /&gt;
Write three programs.&lt;br /&gt;
&lt;br /&gt;
First one -- execute -- runs the program &amp;quot;stopper&amp;quot; (you can find it in the prototype below) with argument &amp;quot;-s&amp;quot; from the same directory where it is located (use only exec()).&lt;br /&gt;
&lt;br /&gt;
The second -- runner -- runs program &amp;quot;stopper&amp;quot; with argument &amp;quot;-s&amp;quot; from the same directory where it is located and waits for it to finish. After the program has concluded, it prints &amp;quot;runner: Stopped&amp;quot;. (fork() + exec() + wait())&lt;br /&gt;
&lt;br /&gt;
Third program -- backgrounder -- runs the program &amp;quot;stopper&amp;quot; with an argument of &amp;quot;-s&amp;quot;, but does not wait for it to conclude; it exits. This would be analogous to the Daemon pattern explained in the lecture.&lt;br /&gt;
&lt;br /&gt;
Backgrounder should print the PID of itself and the child when it runs.&lt;br /&gt;
&lt;br /&gt;
NB! If you want to compile only the first program, write &amp;quot;make stopper&amp;quot; or &amp;quot;make runner&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Prototype ==&lt;br /&gt;
&lt;br /&gt;
The prototype can be found at /export/kursused/iti8510/ (or [http://dijkstra.cs.ttu.ee/iti8510/processes.tar.gz] )&lt;br /&gt;
To copy the file to the current directory:&lt;br /&gt;
 cp /export/kursused/iti8510/processes.tar.gz .&lt;br /&gt;
&lt;br /&gt;
Untar it:&lt;br /&gt;
 tar -xzvf processes.tar.gz&lt;/div&gt;</summary>
		<author><name>Irve</name></author>
	</entry>
</feed>