/[path-sandbox]/trunk/src/sandbox.c
Gentoo

Diff of /trunk/src/sandbox.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 266 Revision 267
39 char tmp_dir[SB_PATH_MAX]; 39 char tmp_dir[SB_PATH_MAX];
40 char *home_dir; 40 char *home_dir;
41} sandbox_info_t; 41} sandbox_info_t;
42 42
43static int print_debug = 0; 43static int print_debug = 0;
44
44static int stop_called = 0; 45volatile static int stop_called = 0;
45
46volatile static pid_t child_pid = 0; 46volatile static pid_t child_pid = 0;
47 47
48extern char **environ; 48extern char **environ;
49 49
50int sandbox_setup(struct sandbox_info_t *sandbox_info) 50int sandbox_setup(struct sandbox_info_t *sandbox_info)
158 return 1; 158 return 1;
159} 159}
160 160
161void stop(int signum) 161void stop(int signum)
162{ 162{
163 if (stop_called == 0) { 163 if (0 == stop_called) {
164 stop_called = 1; 164 stop_called = 1;
165 printf("sandbox: Caught signal %d in pid %d\n", 165 printf("sandbox: Caught signal %d in pid %d\n",
166 signum, getpid()); 166 signum, getpid());
167 167
168 if ((SIGUSR1 == signum) && (0 != child_pid)) 168 if ((SIGUSR1 == signum) && (0 != child_pid))

Legend:
Removed from v.266  
changed lines
  Added in v.267

  ViewVC Help
Powered by ViewVC 1.1.20