wrap fork so we can drop priority in child processes

This commit is contained in:
Anthony Minessale committed 2012-10-01 13:38:45 -05:00
1 parent 0995d133a6
commit 52eff9451c
8 files changed
+31 -11

No files matched your search

@@ -1185,7 +1185,7 @@ int celliax_serial_getstatus_AT(struct celliax_pvt *p)
NOTICA("incoming SMS message:>>>%s<<<\n", CELLIAX_P_LOG, p->sms_message);
pipe(fd1);
pid1 = fork();
pid1 = switch_fork();
if (pid1 == 0) { //child
int err;
@@ -1735,7 +1735,7 @@ int celliax_serial_read_AT(struct celliax_pvt *p, int look_for_ack, int timeout_
NOTICA("incoming SMS message:>>>%s<<<\n", CELLIAX_P_LOG, p->sms_message);
pipe(fd1);
pid1 = fork();
pid1 = switch_fork();
if (pid1 == 0) { //child
int err;
@@ -3101,7 +3101,7 @@ int gsmopen_serial_getstatus_AT(private_t *tech_pvt)
DEBUGA_AT("incoming SMS message:---%s---\n", GSMOPEN_P_LOG, p->sms_message);
pipe(fd1);
pid1 = fork();
pid1 = switch_fork();
if (pid1 == 0) { //child
int err;
@@ -108,7 +108,7 @@ static switch_status_t shell_stream_file_open(switch_file_handle_t *handle, cons
if (pipe(context->fds)) {
goto error;
} else { /* good to go */
context->pid = fork();
context->pid = switch_fork();
if (context->pid < 0) { /* ok maybe not */
goto error;
@@ -65,7 +65,7 @@ $SIG{CHLD} = "IGNORE";
while (my $request = $scgi->accept) {
# fork every new req into its own process (optional)
my $pid = fork();
my $pid = switch_fork();
if ($pid) {
$request->close();