Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
exercises
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ISC2
os
exercises
Commits
6f0673d5
Commit
6f0673d5
authored
1 year ago
by
iliya.saroukha
Browse files
Options
Downloads
Patches
Plain Diff
finished ex1
parent
b2a9e9d4
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
serie1/ex1.md
+37
-1
37 additions, 1 deletion
serie1/ex1.md
serie1/ex2/.gitignore
+2
-0
2 additions, 0 deletions
serie1/ex2/.gitignore
serie1/ex2/Makefile
+20
-0
20 additions, 0 deletions
serie1/ex2/Makefile
serie1/ex2/prog.c
+9
-0
9 additions, 0 deletions
serie1/ex2/prog.c
with
68 additions
and
1 deletion
serie1/ex1.md
+
37
−
1
View file @
6f0673d5
...
...
@@ -31,6 +31,42 @@ PID TTY TIME CMD
1 ? 00:00:02 systemd
```
# Identifiez au moins 4 groupes de processus contenant chacun au moins 5 processus et pour chacu, déterminez le _group leader_
Par contre, si l'on utilise les flags
`-ef`
pour la commande
`ps`
, le nom du
processus portant le
`PID`
1 est
`init`
provenant de
`/sbin/init splash`
. En
réalité
`init`
est aussi
`systemd`
mais ce nom sera régi par la distribution
utilisée.
# Identifiez au moins 4 groupes de processus contenant chacun au moins 5 processus et pour chacun, déterminez le _group leader_
## Format
-
Process(PID, PGID)
-
Child process(PIDs range, PGID)
$
\R
ightarrow$ Group leader
## Réponses
-
`Xorg`
(2298, 2296)
-
`{Xorg}`
(2299 -- 2331, 2296)
$
\R
ightarrow$
`gdm-x-session`
(2296, 2296)
-
`evolution-alarm`
(3060, 2650)
-
`{evolution-alarm}`
([3182 -- 3183; 3190; 3217 -- 3218; 3254], 2296)
$
\R
ightarrow$
`gnome-session-b`
(2650, 2650)
-
`fwupd`
(3403, 3403)
-
`{fwupd}`
([3412 -- 3415; 3417], 3403)
$
\R
ightarrow$
`fwupd`
(3403, 3403)
-
`xdg-document-po`
(2213, 2213)
-
`{xdg-document-po}`
([2214 -- 2216; 2223; 2225; 2226], 2213)
$
\R
ightarrow$
`xdg-document-po`
(2213, 2213)
This diff is collapsed.
Click to expand it.
serie1/ex2/.gitignore
0 → 100644
+
2
−
0
View file @
6f0673d5
*.o
prog
This diff is collapsed.
Click to expand it.
serie1/ex2/Makefile
0 → 100644
+
20
−
0
View file @
6f0673d5
CC
:=
clang
CFLAGS
:=
-g
-pedantic
-Wall
-Wextra
-std
=
c2x
LDFLAGS
:=
-fsanitize
=
address
-fsanitize
=
leak
-fsanitize
=
undefined
-lm
TARGET
:=
prog
all
:
$(TARGET)
$(TARGET)
:
prog.o
@
printf
"=================== Building executable ===================
\n
"
$(
CC
)
$(
CFLAGS
)
$^
-o
$@
$(
LDFLAGS
)
@
printf
"
\n
"
%.o
:
%.c
@
printf
"================== Building object files ==================
\n
"
$(
CC
)
$(
CFLAGS
)
-c
$<
@
printf
"
\n
"
clean
:
rm
-f
*
.o
$(
TARGET
)
This diff is collapsed.
Click to expand it.
serie1/ex2/prog.c
0 → 100644
+
9
−
0
View file @
6f0673d5
#include
<stdio.h>
#include
<unistd.h>
int
main
(
void
)
{
printf
(
"Voilà un mystère digne de Sherlock Holmes !"
);
fork
();
printf
(
"
\n
"
);
return
0
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment