git.samba.org
/
tridge
/
junkcode.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
show version
[tridge/junkcode.git]
/
clone.c
1
#include <sched.h>
2
#include <unistd.h>
3
4
static void fn1(void)
5
{
6
sleep(1);
7
system("/bin/pwd");
8
}
9
10
main()
11
{
12
char stack[81920];
13
clone(fn1, stack+80000 , CLONE_FS, NULL);
14
chdir("/tmp");
15
sleep(2);
16
system("/bin/pwd");
17
}