X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=afs.c;h=1f3fafacec1c757b47659c77d2bf2da1062e3cbf;hp=23f2a93bc8610be978a98e61af6fd43ae6d1785f;hb=5edb8fd098c2f392702a7b07bda664f1acf4b350;hpb=7dc1b56764191dab6aedf360c7a6d648fa49a37c diff --git a/afs.c b/afs.c index 23f2a93b..1f3fafac 100644 --- a/afs.c +++ b/afs.c @@ -744,7 +744,7 @@ static void afs_signal_post_select(struct sched *s, struct task *t) } PARA_EMERG_LOG("terminating on signal %d\n", signum); shutdown: - sched_shutdown(s); + task_notify_all(s, E_AFS_SIGNAL); t->error = -E_AFS_SIGNAL; } @@ -798,7 +798,7 @@ static void command_pre_select(struct sched *s, struct task *t) * * This function creates a shared memory area large enough to hold * the content given by \a buf and \a size and sends the identifier - * of this area to the file descriptor given by \a fd_ptr. + * of this area to the file descriptor \a fd. * * It is called by the AFS max_size handler as well as directly by the AFS * command callbacks to send command output to the command handlers. @@ -921,10 +921,16 @@ static void command_post_select(struct sched *s, struct task *t) struct afs_client *client, *tmp; int fd, ret; + ret = task_get_notification(t); + if (ret < 0) { + t->error = ret; + return; + } ret = execute_server_command(&s->rfds); if (ret < 0) { PARA_EMERG_LOG("%s\n", para_strerror(-ret)); - sched_shutdown(s); + task_notify_all(s, -ret); + t->error = ret; return; } /* Check the list of connected clients. */ @@ -1063,7 +1069,7 @@ int com_init(struct command_context *cc) } ret = send_callback_request(create_tables_callback, &query, afs_cb_result_handler, cc); - if (ret < 0) + if (ret < 0 && !cc->use_sideband) /* ignore return value */ sc_send_va_buffer(&cc->scc, "%s\n", para_strerror(-ret)); return ret;