Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/jail/command.c
Show First 20 Lines • Show All 671 Lines • ▼ Show 20 Lines | if (pid > 0) { | ||||
if (bg || !add_proc(j, pid)) { | if (bg || !add_proc(j, pid)) { | ||||
free(j->comline); | free(j->comline); | ||||
j->comline = NULL; | j->comline = NULL; | ||||
return 0; | return 0; | ||||
} else { | } else { | ||||
paralimit--; | paralimit--; | ||||
return 1; | return 1; | ||||
} | } | ||||
} else { | |||||
/* | |||||
* The parent is ignoring SIGINT, with the expectation that the | |||||
* command should be terminated first, triggering appropriate | |||||
* cleanup here in jail(8). | |||||
*/ | |||||
(void)signal(SIGINT, SIG_DFL); | |||||
} | } | ||||
if (bg) | if (bg) | ||||
setsid(); | setsid(); | ||||
/* Set up the environment and run the command */ | /* Set up the environment and run the command */ | ||||
pwd = NULL; | pwd = NULL; | ||||
lcap = NULL; | lcap = NULL; | ||||
if ((clean || username) && injail && sjuser && | if ((clean || username) && injail && sjuser && | ||||
▲ Show 20 Lines • Show All 309 Lines • Show Last 20 Lines |