uqs's projects
/
games.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f956eae
)
rogue(6): Fix broken aliasing for -O2 or higher.
author
Sascha Wildner
<saw@online.de>
Fri, 9 Oct 2009 18:55:05 +0000
(20:55 +0200)
committer
Sascha Wildner
<saw@online.de>
Fri, 9 Oct 2009 18:55:05 +0000
(20:55 +0200)
Fix taken from OpenBSD.
Submitted-by: Ulrich Spoerlein <uqs@spoerlein.net>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1551>
games/rogue/machdep.c
patch
|
blob
|
blame
|
history
diff --git
a/games/rogue/machdep.c
b/games/rogue/machdep.c
index
ae9e39a
..
3d8abe4
100644
(file)
--- a/
games/rogue/machdep.c
+++ b/
games/rogue/machdep.c
@@
-536,14
+536,22
@@
md_lock(boolean l)
void
md_shell(const char *shell)
{
- long w[2];
-
- if (!fork()) {
+ int w;
+ pid_t pid;
+
+ pid = fork();
+ switch (pid) {
+ case -1:
+ break;
+ case 0:
/* revoke */
setgid(getgid());
execl(shell, shell, NULL);
+ _exit(255);
+ default:
+ waitpid(pid, &w, 0);
+ break;
}
- wait((int *)w);
}
#endif /* UNIX */