aboutsummaryrefslogtreecommitdiffhomepage
path: root/proc.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-11-19 00:31:03 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-11-19 00:31:03 -0800
commit26678682ca90b68f19b993e259bf43384c0a18ec (patch)
treeaf119f1845d12657d42e8ba57f90350c9f89c57f /proc.cpp
parent7d63900fb8167d344a58c0c7e541166974b0c672 (diff)
Fix indentation of switch statements
Diffstat (limited to 'proc.cpp')
-rw-r--r--proc.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/proc.cpp b/proc.cpp
index 9a1a0cdc..b061bdd8 100644
--- a/proc.cpp
+++ b/proc.cpp
@@ -566,16 +566,16 @@ void job_handle_signal(int signal, siginfo_t *info, void *con)
{
switch (pid=waitpid(-1,&status,WUNTRACED|WNOHANG))
{
- case 0:
- case -1:
- {
- errno=errno_old;
- return;
- }
- default:
+ case 0:
+ case -1:
+ {
+ errno=errno_old;
+ return;
+ }
+ default:
- handle_child_status(pid, status);
- break;
+ handle_child_status(pid, status);
+ break;
}
}
kill(0, SIGIO);
@@ -1123,45 +1123,45 @@ void job_continue(job_t *j, int cont)
// debug( 1, L"select_try()" );
switch (select_try(j))
{
- case 1:
- {
- read_try(j);
- break;
- }
-
- case -1:
- {
- /*
- If there is no funky IO magic, we can use
- waitpid instead of handling child deaths
- through signals. This gives a rather large
- speed boost (A factor 3 startup time
- improvement on my 300 MHz machine) on
- short-lived jobs.
- */
- int status;
- pid_t pid = waitpid(-1, &status, WUNTRACED);
- if (pid > 0)
+ case 1:
{
- handle_child_status(pid, status);
+ read_try(j);
+ break;
}
- else
+
+ case -1:
{
/*
- This probably means we got a
- signal. A signal might mean that the
- terminal emulator sent us a hup
- signal to tell is to close. If so,
- we should exit.
+ If there is no funky IO magic, we can use
+ waitpid instead of handling child deaths
+ through signals. This gives a rather large
+ speed boost (A factor 3 startup time
+ improvement on my 300 MHz machine) on
+ short-lived jobs.
*/
- if (reader_exit_forced())
+ int status;
+ pid_t pid = waitpid(-1, &status, WUNTRACED);
+ if (pid > 0)
{
- quit = 1;
+ handle_child_status(pid, status);
}
+ else
+ {
+ /*
+ This probably means we got a
+ signal. A signal might mean that the
+ terminal emulator sent us a hup
+ signal to tell is to close. If so,
+ we should exit.
+ */
+ if (reader_exit_forced())
+ {
+ quit = 1;
+ }
+ }
+ break;
}
- break;
- }
}
}