Blender V2.61 - r43446
|
#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 31 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 81 of file blenderplayer-wrapper.c.
References blenderplayer_id, display(), credits_svn_gen::e, new_id(), NULL, print_id(), and sigterm_handler().
void print_id | ( | ) |
Definition at line 51 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 64 of file blenderplayer-wrapper.c.
References blenderplayer_id.
Referenced by main().
pid_t blenderplayer_id = 0 |
Definition at line 47 of file blenderplayer-wrapper.c.
Referenced by main(), and sigterm_handler().