Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
uva
Commits
5f6c1008
Commit
5f6c1008
authored
Nov 07, 2010
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added implementation details to the report of OS ass 3.
parent
b4298d2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
os/ass3/report/report.tex
os/ass3/report/report.tex
+19
-0
No files found.
os/ass3/report/report.tex
View file @
5f6c1008
...
@@ -249,6 +249,12 @@ for i in {1..6}; do ./fish < input$i.txt; \
...
@@ -249,6 +249,12 @@ for i in {1..6}; do ./fish < input$i.txt; \
\subsection
{
Signal verwerking
}
\subsection
{
Signal verwerking
}
In stap
7
wordt gevraagd om een signal handler in te bouwen in de bigfish. Met
deze signal handler kunnen signal worden opgevangen en in dit geval schrijft de
handler een bericht naar
\texttt
{
stdout
}
met de ontvangen signal. Voordat de
bigfish leest van
\texttt
{
stdin
}
, worden de signal handlers als volgt
toegewezen:
\begin
{
lstlisting
}
[
numbers
=
none,backgroundcolor
=
\color
{
darkgray
}
]
\begin
{
lstlisting
}
[
numbers
=
none,backgroundcolor
=
\color
{
darkgray
}
]
/*
Bind signal handlers
*/
/*
Bind signal handlers
*/
if
(
sigaction
(
SIGINT,
&
action, NULL
)
if
(
sigaction
(
SIGINT,
&
action, NULL
)
...
@@ -262,6 +268,19 @@ if( sigaction(SIGINT, &action, NULL)
...
@@ -262,6 +268,19 @@ if( sigaction(SIGINT, &action, NULL)
% wait() beschrijven.
% wait() beschrijven.
\noindent
In de man page van
\texttt
{
sigaction
}
\footnote
{
http:
//
www.kernel.org
/
doc
/
man
-
pages
/
online
/
pages
/
man
2
/
sigaction.
2
.html
}
staat een
\emph
{
flag
}
met betrekking tot zombieprocessen en
\texttt
{
SIGCHLD
}
:
\\
\\
\texttt
{
SA
\_
NOCLDWAIT
(
since Linux
2
.
6
)
\\
If signum is SIGCHLD, do not
transform children into zombies when they terminate. This flag is only
meaningful when establishing a handler for SIGCHLD.
}
\\
\\
Met die flag worden kindprocessen niet op defunct gezet, maar direct
vrijgegeven. Daardoor is er geen
\texttt
{
wait
()
}
meer nodig binnen de signal
handler.
\pagebreak
\pagebreak
\begin
{
appendices
}
\begin
{
appendices
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment