You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
356 B
20 lines
356 B
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
#include <string.h>
|
|
|
|
int main() {
|
|
|
|
char foo[] = "This is some text from proc-1";
|
|
|
|
printf("Now execute\n");
|
|
printf(" sudo ./testProgram2 %d %lx %lu\n", getpid(), (long unsigned int) foo, strlen(foo)+1);
|
|
|
|
printf("Press any key\n");
|
|
while (1) {
|
|
getchar();
|
|
|
|
printf("foo has changed to: %s\n", foo);
|
|
}
|
|
|
|
}
|
|
|