Skip to content

Commit

Permalink
even better
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeDP committed Nov 10, 2015
1 parent e5e6b75 commit 068302b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/worker_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static void sig_handler(int signum);

static pthread_t worker_th;
static thread_job_list *current_th; // current_th: ptr to latest elem in thread_l list
static struct thread_mesg thread_m = {"", INFO_LINE};
static struct thread_mesg thread_m;

/*
* Creates a new job object for the worker_thread appending it to the end of job's queue.
Expand Down Expand Up @@ -74,6 +74,8 @@ void init_thread(int type, int (* const f)(void)) {
inhibit_suspend();
}
#endif
thread_m.str = "";
thread_m.line = INFO_LINE;
pthread_create(&worker_th, NULL, execute_thread, NULL);
}
}
Expand Down Expand Up @@ -132,8 +134,6 @@ static void *execute_thread(void *x) {
return execute_thread(NULL);
}
num_of_jobs = 0;
thread_m.str = "";
thread_m.line = INFO_LINE;
print_info("", ASK_LINE);
#ifdef SYSTEMD_PRESENT
if (config.inhibit) {
Expand Down

0 comments on commit 068302b

Please sign in to comment.