|
Blender
V2.59
|
#include <stdio.h>#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <pwd.h>#include <stdlib.h>#include <string.h>#include <signal.h>Go to the source code of this file.
Defines | |
| #define | _GNU_SOURCE |
Functions | |
| void | print_id () |
| void | sigterm_handler (int signum) |
| int | main (int argc, char *argv[]) |
Variables | |
| pid_t | blenderplayer_id = 0 |
| #define _GNU_SOURCE |
Definition at line 33 of file blenderplayer-wrapper.c.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Run blenderplayer sandboxed. It has two parameters argv[1] should be a file name argv[2] should be an window handle id
This code runs with elevated privileges
Drop privileges
Still running with higher privileges
Definition at line 82 of file blenderplayer-wrapper.c.
References blenderplayer_id, new_id(), NULL, print_id(), and sigterm_handler().
| void print_id | ( | ) |
Definition at line 53 of file blenderplayer-wrapper.c.
Referenced by main().
| void sigterm_handler | ( | int | signum | ) |
This function is used to catch SIGTERM signal (raised by web plugin when the plugin should shut down and raise a SIGKILL signal to the blenderplayer in order to kill it.
Definition at line 66 of file blenderplayer-wrapper.c.
References blenderplayer_id.
Referenced by main().
| pid_t blenderplayer_id = 0 |
Definition at line 49 of file blenderplayer-wrapper.c.
Referenced by main(), and sigterm_handler().